Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking edit on media picker launches the save dialog #7185

Closed
Shazwazza opened this issue Nov 20, 2019 · 5 comments
Closed

Clicking edit on media picker launches the save dialog #7185

Shazwazza opened this issue Nov 20, 2019 · 5 comments

Comments

@Shazwazza
Copy link
Contributor

Shazwazza commented Nov 20, 2019

If you have a media picker and you click the edit (pencil) button the document is Saved or the Save dialog is launched (if it's a variant)!

See gif:

EDC6226A-8623-4637-8E65-67041DD59F43

If its invariant, clicking the pencil actually just automatically goes and saves the document without any warning.

Version: Latest dev/v8 branch (currently set to 8.4.0)

@kjac
Copy link
Contributor

kjac commented Nov 20, 2019

I can reproduce. For some reason this doesn't happen when the media picker is in multiple mode, though 🤔 I'll dig into it.

@kjac
Copy link
Contributor

kjac commented Nov 20, 2019

Right. I did suspect this... the buttons were turned into actual <button> tags instead of <a> tags in an effort to make the media picker more accessible (#6805). Depending on your property order and configuration this means that the browser might see the link picker edit media button as the first <button> element in the form and thus treat it as a submit button.

@MMasey this might be something you should bring back to the accessibility team?

I'll push a PR momentarily to fix it.

@kjac
Copy link
Contributor

kjac commented Nov 20, 2019

PR in #7188

@hemraker
Copy link
Member

Perfect @kjac, thanks a bunch for picking this up 🙌

@kjac
Copy link
Contributor

kjac commented Feb 13, 2020

Whoops this issue was closed a bit premature; #7651 fixes it though, so now it really should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants