Opened 7 years ago
Closed 7 years ago
#15074 closed bug (fixed)
Form attribute ignored for dialog buttons
Reported by: | Blipz | Owned by: | Scott González |
---|---|---|---|
Priority: | minor | Milestone: | 1.12.2 |
Component: | ui.dialog | Version: | 1.12.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When defining buttons in a dialog, the "form" attribute seems to be ignored.
See for example https://jsfiddle.net/xyfdcaq2/2/
This behavior has appeared in 1.12.0.
Note: the "click" entry seems to be mandatory, is it normal?
Change History (2)
comment:1 Changed 7 years ago by
Milestone: | none → 1.12.2 |
---|---|
Status: | new → open |
comment:2 Changed 7 years ago by
Owner: | set to Scott González |
---|---|
Resolution: | → fixed |
Status: | open → closed |
In 0627eb3:
Note: See
TracTickets for help on using
tickets.
This is because we supply a
.form()
method on jQuery instances to mimc the nativeform
property (in order to support IE 8). We use the$(html, props)
method to pass the options through, and if there's a method that matches the name of the property, it gets invoked instead of setting the attribute.Since the
.form()
method is not intended to be public, we should rename it to avoid issues like this.As far as requiring
click
, yes, that's expected. Buttons in a dialog are expected to have an explicitly defined behavior. In this case, I would suggest usingclick
and having it submit the form you care about, especially since all dialog buttons are explicitly set as regular buttons, not submit buttons.