Closed Bug 966730 Opened 12 years ago Closed 11 years ago

Disabling toggle buttons doesn't work

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(firefox29 fixed, firefox30 fixed)

RESOLVED FIXED
Tracking Status
firefox29 --- fixed
firefox30 --- fixed

People

(Reporter: canuckistani, Assigned: zer0)

References

Details

Attachments

(2 files)

If you use this code and click one, the button shouldn't be clickable afterwards: let toggle = ToggleButton({ id: 'test-toggle-button', label: 'Toggle Button', icon: './icon.png', onChange: (state) => { // by default, state is provided per window require('sdk/tabs').activeTab.attach({contentScript: 'alert("'+state.checked+'")'}); toggle.disabled = true; } });
Comment on attachment 8369175 [details] [review] Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1376 Please add a test case, to make sure fix addresses issue and we don't regress it in a future.
Attachment #8369175 - Flags: review?(rFobic) → review-
Blocks: 907450
Comment on attachment 8369175 [details] [review] Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1376 PR changed, needs another review.
Attachment #8369175 - Flags: review- → review?(rFobic)
Attachment #8369175 - Flags: review?(rFobic) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/fce1ba416f4f37c9954bf38f21345f6ab250ef2f Bug 966730 - Disabling toggle buttons doesn't work - Avoid to set unnecessary state properties - Set the toggle on window level by default - Added test cases https://github.com/mozilla/addon-sdk/commit/872737d42814cba0e1d1f7131b4773732633148f Merge pull request #1376 from ZER0/toggle-disabled/966730 fix Bug 966730 - Disabling toggle buttons doesn't work r=@gozala
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attached patch patchSplinter Review
Possible aurora uplift patch but it had conflicts so checking what else is missing...
Comment on attachment 8384948 [details] [diff] [review] patch [Approval Request Comment] Bug caused by (feature/regressing bug #): New SDK UI widgets User impact if declined: Add-on developers won't be able to disable toolbar buttons created with the new API Testing completed (on m-c, etc.): On m-c for a few days Risk to taking this patch (and alternatives if risky): Pretty low risk and has tests String or IDL/UUID changes made by this patch: None
Attachment #8384948 - Flags: approval-mozilla-aurora?
Attachment #8384948 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: