-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dialog: Set the type on buttons. Fixes #6128 - Dialog: Buttons are no…
…t type="button".
- Loading branch information
1 parent
a2ddfd5
commit cd7f10d
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will trigger this error in all browsers
doc.createDocumentFragment is not a function
as
jQuery( html, props )
isn't built to be used in this way (jQuery( html, props )). The docs describe thehtml
parameter asPassing in as
html
anything other (complex html, not single standalone tag e.g as above with "inline" attributes) while the second parameter (as in this case) isn't acontext
but a map of attributes will trigger the above exception.As simply doing
{ click: props, text: name, type: "button" }
and$('<button></button>', props)
won't work, due to IE not allowing to change the type after thebutton
has been created, I propose this alternative fix