Skip to main content

Search and Top Navigation

#15074 closed bug (fixed)

Opened October 07, 2016 01:37PM UTC

Closed October 11, 2016 02:15PM UTC

Form attribute ignored for dialog buttons

Reported by: Blipz Owned by: scottgonzalez
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?

Attachments (0)
Change History (2)

Changed October 07, 2016 01:57PM UTC by scottgonzalez comment:1

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.

Changed October 11, 2016 02:15PM UTC by scottgonzalez comment:2

owner: → scottgonzalez
resolution: → fixed
status: openclosed

In [changeset:"0627eb3645009d868ae20a27d0a283acd5797a1f" 0627eb3]:

#!CommitTicketReference repository="" revision="0627eb3645009d868ae20a27d0a283acd5797a1f"
Form: Rename from  to  since its not for public use

Fixes #15074
Closes gh-1760