Closed Bug 56776 Opened 25 years ago Closed 25 years ago

Please support <key disabled="true"/>

Categories

(SeaMonkey :: UI Design, enhancement, P3)

enhancement

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: timeless, Assigned: don)

Details

most xul dom elements can be disabled by adding: disabled="true" unfortunately keys are not among them. in my test i needed to do the following: <key id="key_test" disabled="true" key="z" modifiers="shift" onkeypress="dump('stupid')"/> <menuitem id="time_test" value="test" key="key_test" oncommand="dump('ya got me');"/> <menuitem value="fail" oncommand="document.getElementById('time_test').removeAttribute('key');document .getElementById('time_test').removeAttribute('acceltext')"/> Click fail. the key is removed. If i don't remove the acceltext you don't notice the key removal (because the text still appears)... imo that should happen due to pseudo css or something not magic that leaves us w/ leftover dom. But ... For the purpose of this bug, setting either in xul or w/ dom the key's disabled property to true should cause the key to be ignored by the app and not to appear in the menu system. If this needs multiple bugs, please file them appropriately.
I disagree. If you're going to selectively disable the key and not the menu command, then I claim you're making a bad association, since the two commands should be identical. Use a <command> node, and make both observe it. Then you can just set disabled on the command node and have both commands update. And we do properly disable the key command. It will not fire. If you don't disable the menu, however, it will still be enabled, and it can be invoked. It doesn't bother me that the accelerator text continues to show up. I don't think it should be magically removed from the menuitem just because the key command is disabled. This isn't a sensible state to be in anyway. Closing as invalid.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
I guess no one disagrees, so verified.
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.