Closed
Bug 135196
Opened 22 years ago
Closed 22 years ago
F7 to toggle browse-with-caret hits a JS error
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: jruderman, Assigned: aaronlev)
Details
(Keywords: embed, Whiteboard: [adt2])
Attachments
(1 file, 1 obsolete file)
2.94 KB,
patch
|
bzbarsky
:
review+
hewitt
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
When I press F7 in 2002 040303, nothing happens in the browser window, and the following appears on the JS console: Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: <unknown filename> :: onxblkeypress :: line 4" data: no]
Assignee | ||
Comment 1•22 years ago
|
||
Strange. Can you look in your all.js file and see if it has the lines: pref("accessibility.browsewithcaret", false); pref("accessibility.warn_on_browsewithcaret", true); Is this a downloaded binary build or compiled from source?
Comment 2•22 years ago
|
||
umm... no matter what the default all.js is, distributors can configure it. Code should always wrap get*Pref calls in try/catch
Assignee | ||
Comment 3•22 years ago
|
||
Ok, now I know. Accepting.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 4•22 years ago
|
||
Interesting, I think we don't use try/catch in a lot of places where we get prefs, for example tabbrowser.xml.
Assignee | ||
Comment 5•22 years ago
|
||
Still not sure why Jesse was getting exceptions. Curious whether his all.js file has the lines I mentioned.
Comment 6•22 years ago
|
||
doesn't that just silently ignore F7 and not go into browse-with-caret mode (since all the code is in thee try)? I'd think that a better approach would be: var foo = true; try { foo = mPrefs.getBoolPref("accessibility.warn_on_browsewithcaret"); } catch (ex) {} if (foo && !browseWithCaret) { // go on } And similarly for other pref accesses.
Assignee | ||
Comment 7•22 years ago
|
||
Attachment #77518 -
Attachment is obsolete: true
Reporter | ||
Comment 8•22 years ago
|
||
The 2002 040303 I tested is a nightly talkbalk zip build for Windows. I installed it in a new directory, like I usually do when I get a new build. I checked all.js and only saw pref("accessibility.browsewithcaret", false);
Comment 9•22 years ago
|
||
Comment on attachment 77535 [details] [diff] [review] Better patch -uses multiple try/catch's Wouldn't it be better to have browseWithCaretOn default to "false"? Do that and r=bzbarsky
Attachment #77535 -
Flags: review+
Assignee | ||
Comment 10•22 years ago
|
||
Done. The reason the exception happened in the first place, is that I forgot to check in my all.js changes! Duh. Anyway, the try/catch is an improvement as well.
Updated•22 years ago
|
Attachment #77535 -
Flags: superreview+
Comment 11•22 years ago
|
||
Comment on attachment 77535 [details] [diff] [review] Better patch -uses multiple try/catch's yeah, default that to false sr=hewitt
Updated•22 years ago
|
Comment 12•22 years ago
|
||
adt1.0.0+ (on ADT's behalf) for approval for checkin.
Comment 13•22 years ago
|
||
Comment on attachment 77535 [details] [diff] [review] Better patch -uses multiple try/catch's a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #77535 -
Flags: approval+
Assignee | ||
Comment 14•22 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 15•22 years ago
|
||
i don't see a js error when using F7. vrfy'd using 2002040510 linux comm bits.
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•