Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334403 - [client] [editor] [Safari] [IE] Ctrl+O incorrectly triggers default browser behavior
Summary: [client] [editor] [Safari] [IE] Ctrl+O incorrectly triggers default browser b...
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 12:39 EST by Mark Macdonald CLA
Modified: 2011-09-01 11:43 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-01-14 12:39:19 EST
Build Identifier: 0.2

Using Safari 5.0.2 (Win) or Internet Explorer 9

Reproducible: Always

Steps to Reproduce:

1. Log into Orion
2. Open the editor on a file.
3. Press Ctrl+O. The outline pane is toggled (as expected), but you also see the Open dialog from the browser.
Comment 1 Mark Macdonald CLA 2011-01-26 14:06:34 EST
> 1. Log into Orion
> 2. Open the editor on a file.
> 3. Press Ctrl+O. The outline pane is toggled (as expected), but you also see
> the Open dialog from the browser.

Something similar happens with Ctrl+F -- you see our "find" prompt, but the browser's Find Toolbar opens too.
Comment 2 Felipe Heidrich CLA 2011-01-27 14:41:36 EST
The code running is correct.

It seems that stopping keydown events on IE (and win-safari too) does not work (the default handler always runs). Maybe this is by design: IE will not let javascript stop the browser's key binding (such as Ctrl+N, Ctrl+F) - in a way, it makes sense to me.
Comment 3 Mark Macdonald CLA 2011-01-27 16:03:43 EST
Google Docs somehow found a way to do this, eg. Ctrl+S saves your document rather than opening the IE Save dialog. I'm not sure what kind of tricks they're using, but hopefully we can do the same.
Comment 4 Felipe Heidrich CLA 2011-01-27 16:28:19 EST
We stop Ctrl+S too, try it out. Our code that stops Ctrl+S won't stop Ctrl+O and Ctrl+F.
Comment 5 Felipe Heidrich CLA 2011-01-27 16:33:24 EST
Awesome, that works http://stackoverflow.com/questions/3618613/suppress-default-handling-of-ctrlo-in-internet-explorer

changing the keyCode is hacky but works, I'll release after M5 so we dont break anything in the release.
Comment 6 Felipe Heidrich CLA 2011-02-01 12:18:55 EST
Fixed.