Opened 5 years ago

Closed 3 years ago

#8975 closed bug (fixed)

Buttonset: refresh method causes JS error after adding new radio buttons

Reported by: gvas Owned by: tj.vantoll
Priority: minor Milestone: 1.11.0
Component: ui.button Version: 1.9.2
Keywords: Cc:
Blocked by: Blocking:

Description

Adding a new radio button to a buttonset and invoking the buttonset's refresh method causes a JS exception. In contrast, adding new checkboxes works fine.

Tested in: Chrome 24, IE 7, IE 8
Operating system: Windows 7 Ultimate x64
Steps to reproduce:

  1. Initialize a buttonset
  2. Insert a new radio button below the buttonset
  3. Invoke the buttonset's refresh method

Expected:

The new radio button is added to the buttonset

Actual:

JS exception: "cannot call methods on button prior to initialization; attempted to call method 'widget'"

Demo: http://jsfiddle.net/zQKV2/

Change History (4)

comment:1 Changed 5 years ago by tj.vantoll

Milestone: none1.11.0
Owner: set to tj.vantoll
Status: newassigned
Summary: buttonset('refresh') causes exception after adding new radio buttonsButtonset: refresh method causes JS error after adding new radio buttons

Verified on master - http://jsfiddle.net/tj_vantoll/zQKV2/1/. I'll take a look at this one.

comment:3 Changed 4 years ago by tj.vantoll

Closed the pull request because this will have to be handled another way. The pull does have a failing test for this problem: https://github.com/jquery/jquery-ui/pull/888/files.

comment:4 Changed 3 years ago by Scott González

Resolution: fixed
Status: assignedclosed

Button: Properly refresh button sets with new radio buttons

Fixes #8975 Ref gh-888

Changeset: 0059722b6b43c4985dbbd5f1494524442c12ddb0

Note: See TracTickets for help on using tickets.