Opened 3 years ago

Closed 19 months ago

Last modified 19 months ago

#9973 closed bug (fixed)

Button: Support the HTML5 form attribute

Reported by: shannonhochkins Owned by:
Priority: minor Milestone: 1.12.0
Component: ui.button Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

I've created a jsfiddle for you to see the issue.

http://jsfiddle.net/3D4Ce/3/

I believe this is becuase in the ui.widget, it's looking for the closest 'form' to reset the events.

Change History (4)

comment:1 Changed 3 years ago by tj.vantoll

Component: ui.widgetui.button
Status: newopen
Summary: Using form="" attribute kills buttonset eventsButton: Support the HTML5 form attribute

comment:2 Changed 3 years ago by epascarello

Not sure what the best solution would be, but I ran into the issue on a page I was working on. Basic fix would be one of two ways:

if ( form ) { 
    radios = $( form ).find( "[name='" + name + "'][type=radio]" );
    if (!radios.length) {  //no child element in the form
        //using old school form element array with names
        radios = $(form[name]);
        //or a selector looking for name attribute
        radios = $( "[name='" + name + "'][type=radio][form='" + form.name + "']" );
    }
}
Last edited 3 years ago by epascarello (previous) (diff)

comment:3 Changed 19 months ago by Scott González

Resolution: fixed
Status: openclosed

Checkboxradio: Properly find radio groups from the associated form

Fixes #9973 Closes gh-1631

Changeset: e77fbe5388abeeb1d0f8f377161a0fc039897594

comment:4 Changed 19 months ago by Scott González

Milestone: none1.12.0
Note: See TracTickets for help on using tickets.