Closed
Bug 342347
Opened 19 years ago
Closed 19 years ago
<xul:key disabled="true" command="foo"/> doesn't honor disabled attribute
Categories
(Toolkit :: UI Widgets, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: WeirdAl, Assigned: WeirdAl)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
4.04 KB,
application/vnd.mozilla.xul+xml
|
Details | |
1.31 KB,
patch
|
smaug
:
first-review+
bryner
:
second-review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060621 SeaMonkey/1.5a
For accessibility purposes, I envisioned dynamically disabling and enabling key sets on the fly. However, when I went to test this, I got some very startling results.
<xul:key disabled="true" oncommand="alert('foo');"/>
You'd never see the alert.
<xul:key disabled="true" command="foo"/>
<xul:command id="foo" oncommand="alert('foo');"/>
You would see the alert here.
Testcase coming up.
Assignee | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
According to documentation, 3 attributes are mirrored/redirected from the command element: oncommand, label and disabled. I don't know if the target (xul:key in this case) is allowed to override the command, though I can see cases for either way.
Assignee | ||
Comment 3•19 years ago
|
||
I think it's okay for a particular key combination to be disabled while the original command is enabled.
<menuitem key="keyFoo" command="cmdFoo"/>
Assignee | ||
Comment 4•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #226542 -
Flags: first-review? → first-review?(Olli.Pettay)
Assignee | ||
Comment 5•19 years ago
|
||
cc'ing bryner - this affects code he has very recently touched.
Comment 6•19 years ago
|
||
Comment on attachment 226542 [details] [diff] [review]
patch, v1
I think it is ok to not to dispatch a command event in the case, when disabled="true". in other xul elements when a click happens, command event is not dispatched if disabled="true".
For example
http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsButtonBoxFrame.cpp#148
Attachment #226542 -
Flags: first-review?(Olli.Pettay) → first-review+
Assignee | ||
Comment 7•19 years ago
|
||
Comment on attachment 226542 [details] [diff] [review]
patch, v1
Seeking second review (should be super-review) from bryner.
Attachment #226542 -
Flags: second-review?(bryner)
Updated•19 years ago
|
Attachment #226542 -
Flags: second-review?(bryner) → second-review+
Assignee | ||
Comment 8•19 years ago
|
||
Fix checked in by smaug - thanks everyone!
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•