Opened 9 years ago

Closed 8 years ago

Last modified 8 years 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 9 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 9 years ago by epascarello

Not sure what the best solution would be, but ran into the issue on a page. Basic fix would be:

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 + "']" );
    }
}
Version 0, edited 9 years ago by epascarello (next)

comment:3 Changed 8 years 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 8 years ago by Scott González

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