Making WordPress.org

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#8205 closed defect (bug) (fixed)

Submission Slug change modal instantly closes

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords: has-patch
Cc:

Description

As reported to plugins@:

Just a heads-up: while submitting a new plugin today, we noticed the "change" link for the slug field opens a modal that immediately closes before it can be used. We reproduced it in both Chrome and Safari.

We were able to work around it with a quick console command (setTimeout(() => { document.querySelector('dialog').showModal() }, 100)) but wanted to flag it in case it's not on your radar.

Change History (3)

This ticket was mentioned in PR #562 on WordPress/wordpress.org by @dd32.


2 months ago
#1

  • Keywords has-patch added

## Summary

Fixes Meta Trac #8205.

  • The "change" link for the slug field on the plugin submission page used href="#" with an inline onclick to call showModal(), but the default href="#" navigation was not prevented, causing the dialog to close immediately after opening.
  • Adds event.preventDefault() to the onclick handler to stop the hash navigation.

## Test plan

  • [ ] Submit a plugin (or view a pending plugin with slug change enabled)
  • [ ] Click the "change" link next to the assigned slug
  • [ ] Verify the dialog opens and stays open
  • [ ] Verify the dialog can be closed via the X button
  • [ ] Verify slug change submission still works

🤖 Generated with Claude Code

#2 @dd32
2 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 14717:

Plugin Directory: Submission: Fix the slug change dialogue immediately closing.

Closes #8205, https://github.com/WordPress/wordpress.org/pull/562.

@dd32 commented on PR #562:


2 months ago
#3

Merged in e2b170e.

Note: See TracTickets for help on using tickets.