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:


When defining buttons in a dialog, the "form" attribute seems to be ignored.

See for example

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 Scott González

Milestone: none1.12.2
Status: newopen

This is because we supply a .form() method on jQuery instances to mimc the native form 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 using click and having it submit the form you care about, especially since all dialog buttons are explicitly set as regular buttons, not submit buttons.

comment:2 Changed 7 years ago by Scott González

Owner: set to Scott González
Resolution: fixed
Status: openclosed

In 0627eb3:

Form: Rename from .form() to ._form() since its not for public use

Fixes #15074
Closes gh-1760

Note: See TracTickets for help on using tickets.