Closed Bug 272705 Opened 20 years ago Closed 20 years ago

Error ``document.getElementById("cmd_SwitchTextDirection") has no properties'' [xs] in file ``chrome://communicator/content/utilityOverlay.js'', line 387, character 0.

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

Details

Attachments

(1 file)

Error ``document.getElementById("cmd_SwitchTextDirection") has no properties''
[xs] in file ``chrome://communicator/content/utilityOverlay.js'', line 387,
character 0.
Stopped for error handler.
#0: function goUpdateGlobalEditMenuItems() in
<chrome://communicator/content/utilityOverlay.js> line 387
385: try {
386: // XXX: implement controller for cmd_SwitchTextDirection
387: document.getElementById('cmd_SwitchTextDirection').setAttribute('disabled',
388: !document.commandDispatcher.focusedElement);
389: }

This happens in various windows including venkman, it's amazingly annoying.
err, my bad :-/
Isn't that why the code is in a try/catch block?
bz: if you set Venkman to break or trace on exception (as opposed to break or
trace on error) then you'll see exceptions before they get caught.

The hack could consider removing the try/catch block too.

The correct fix is for Mano to write the cmd_SwitchTextDirection controller :-)
The break-on-exception mode is already painful enough, since so much of the
XPCOM traffic _does_ throw exceptions for normal things (security checks, anyone?)
Attachment #167612 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #167612 - Flags: review?(neil.parkwaycc.co.uk)
timeless, i guess you want to remove the try block if you're landing this one.
can't document.commandDispatcher.focusedElement fail? :)
Comment on attachment 167612 [details] [diff] [review]
look before we leap

r+sr=me if you remind Mano to fix it properly ;-)

If focusedElement fails we're in real trouble :-P
Attachment #167612 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #167612 - Flags: superreview+
Attachment #167612 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #167612 - Flags: review+
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: