Search and Top Navigation
#9973 closed bug (fixed)
Opened April 10, 2014 02:39AM UTC
Closed October 29, 2015 03:19PM UTC
Last modified October 29, 2015 03:29PM UTC
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.
I believe this is becuase in the ui.widget, it's looking for the closest 'form' to reset the events.
Attachments (0)
Change History (4)
Changed April 10, 2014 12:13PM UTC by comment:1
component: | ui.widget → ui.button |
---|---|
status: | new → open |
summary: | Using form="" attribute kills buttonset events → Button: Support the HTML5 form attribute |
Changed May 30, 2014 01:53PM UTC by comment:2
_comment0: | 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 + "']" ); \ } \ } \ }}} → 1401458164866995 |
---|
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 + "']" ); } }
Changed October 29, 2015 03:19PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | open → closed |
Checkboxradio: Properly find radio groups from the associated form
Fixes #9973
Closes gh-1631
Changeset: e77fbe5388abeeb1d0f8f377161a0fc039897594
Changed October 29, 2015 03:29PM UTC by comment:4
milestone: | none → 1.12.0 |
---|
Reduced: http://jsfiddle.net/tj_vantoll/twmGK/