Closed
Bug 51796
Opened 24 years ago
Closed 24 years ago
Right clicking on XUL radio button checks button without unchecking others
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
Attachments
(2 files)
2.15 KB,
patch
|
Details | Diff | Splinter Review | |
2.19 KB,
patch
|
Details | Diff | Splinter Review |
Build ID: (just pulled) Steps to Reproduce: (1) Open Prefs (2) Go to the Navigator pane (3) Right click on all of the radio buttons in When Navigator starts up, Display Note that all the buttons get checked, but nothing gets unchecked. This might be related to a fix I recall ben checking in for bug 30878 to fix radio buttons and checkboxes (but then, I also have a recollection of him backing out his change...and checkboxes still check on right-click)
Updated•24 years ago
|
Target Milestone: --- → Future
Comment 1•24 years ago
|
||
Didn't Timeless contribute a patch that Ben needs to review? That bug is still nsbeta3-, so this is probably a dup, and is in any case ->future.
Assignee | ||
Comment 2•24 years ago
|
||
I don't think so (re: this being a dup), but maybe. iirc, right clicking on a radio button used to still check it (which is what that bug covers), but would still uncheck the other radio buttons in that radiogroup. This no longer works properly. Another incorrect behavior is that if a radio button is already checked and you right click it, it will uncheck (in other words, right click just toggles the checked/unchecked states without having regard for the rest of the radiogroup). In any case, future is fine...
Comment 3•24 years ago
|
||
I guess I assumed that this misbehavior would go away once the issues described in bug 30878 were resolved, but that's why I futured it rather than resolving, so we can sort out the details when we have more time.
Updated•24 years ago
|
Status: NEW → ASSIGNED
Comment 8•24 years ago
|
||
I have read bug 30878 and it doesn't help this. Bug 30878 is about oncommand and onclick, while this is about right-clicking on radio buttons. I have a very easy and safe fix for this, which apparently works for me.. It consists in adding a second "if" to the click handler like this : if (!event.target.disabled && event.target.localName == "radio" && event.button == 1) this.selectedItem = event.target; else if (!event.target.disabled && event.target.localName == "radio" && event.button == 3) this.selectedItem = event.target; Note that we could eventually add a "|| event.button == 3" in the first if to avoid a second if, which could be bad for performance, but I'm not sure that works, i'll test it when I get back home. This way, right-clicking on radio buttons acts just the same as left-clicking. Now if we don't want to use the right-click at all, then I don't know how to do it, but I'm happy with the right-click = left-click. Fabian.
Comment 9•24 years ago
|
||
I don't think right-clicking a checkbox or radiobutton should modify the state. The right fix in that case would be to make xulBindings.xml#checkbox's click handler check for button 1 (left-click) to be used before changing state.
Comment 11•24 years ago
|
||
No, don't make the secondary button do the same thing the primary button does -- all that will do is confuse a complete novice user about which button is which. (And native Windows radio buttons don't respond to the secondary mouse button, either.)
Assignee | ||
Comment 13•24 years ago
|
||
Assignee | ||
Comment 14•24 years ago
|
||
Assignee | ||
Comment 15•24 years ago
|
||
cc'ing alec for sr
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla1.0
Comment 16•24 years ago
|
||
coolness. sr=alecf
Comment 18•24 years ago
|
||
r=timeless, hoping that selecteditem doesn't catch radiobuttons in nested radiogroups.
Assignee | ||
Comment 19•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•