This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 412001 - [KeyBindings] Ctrl+F in Browser widget in a dialog is wrongly forwarded to workbench window
Summary: [KeyBindings] Ctrl+F in Browser widget in a dialog is wrongly forwarded to wo...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.4 M5   Edit
Assignee: Paul Elder CLA
QA Contact: Paul Elder CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 426019
  Show dependency tree
 
Reported: 2013-07-01 09:29 EDT by Markus Keller CLA
Modified: 2014-01-21 09:52 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2013-07-01 09:29:09 EDT
Broken in 4.2.2 and in 4.3; works fine 3.8.2.

Probably a similar reason as bug 411602.

- open a text editor
- open a dialog with a "?" (Help) button (e.g. About Eclipse) and click the "?"
- click a link to get to an HTML page
- click into the Browser widget
- press Ctrl+F
=> the keystroke is wrongly processed by the workbench window. Find/Replace dialog is opened in the workbench window (behind the dialog). Can also be reproduced in a persisted Javadoc hover (F2).
Comment 1 Dani Megert CLA 2013-08-09 04:01:11 EDT
> Probably a similar reason as bug 411602.

The fix for bug 411602 did not fix this bug here.
Comment 2 Paul Webster CLA 2013-08-19 14:28:13 EDT
Grant, can you think of any reason I'm getting a KeyDown event on windows (I guess from IE) but not on linux (from FF)?

PW
Comment 3 Paul Elder CLA 2013-11-08 11:01:38 EST
Pushed fix (on master/4.4) to Gerrit for review:

https://git.eclipse.org/r/18228

The ShellActivationListener's deactivate handler incorrectly assumed that if a dialog is deactivated, then the previously active context (e.g. the workbench window) must be active. But, in the case of Ctrl+F, a browser-supplied dialog is active. Re-activating the workbench window enables Ctrl+F to also be handled there.

In my testing, the removed branch of code in ShellActivationListener was only ever hit when a dialog has lost focus. In the case of the dialog closing, other mechanisms were already re-activating the previously active context(s). Tested a deactivating dialogs and modeless dialogs in a number of other scenarios, and the removed code was never necessary -- the activation of another window in the application was always detected.
Comment 4 Paul Webster CLA 2013-11-12 16:37:02 EST
(In reply to Paul Elder from comment #3)
> Pushed fix (on master/4.4) to Gerrit for review:
> 
> https://git.eclipse.org/r/18228

My testing couldn't reproduce the problem on linux, but all the tests pass so I've recommended Eric review the patch as well.

I found Bug 421574 during testing.

PW
Comment 5 Paul Elder CLA 2013-11-15 10:11:12 EST
Bug 413977 is very similar, but the fix here has no impact on that bug :-(
Comment 6 Paul Webster CLA 2013-11-15 13:45:30 EST
(In reply to Paul Elder from comment #3)
> Pushed fix (on master/4.4) to Gerrit for review:
> 
> https://git.eclipse.org/r/18228

Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5db9936fcbc271f94ecb22aababc118153503e72

PW
Comment 7 Paul Webster CLA 2013-11-18 14:19:38 EST
Paul, I've patched back the fix as https://git.eclipse.org/r/#/c/18520/ for review.

PW
Comment 10 Paul Elder CLA 2013-11-29 10:27:30 EST
Verified in 4.3.0.M20131127-1300
Comment 11 Dani Megert CLA 2013-12-04 09:30:52 EST
This fix broke the Key Assist dialog on Linux, see bug 420742.
Comment 12 Dani Megert CLA 2013-12-04 11:34:58 EST
(In reply to Dani Megert from comment #11)
> This fix broke the Key Assist dialog on Linux, see bug 420742.

Reverted the changes for now (see bug 420742 comment 7).

master: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ba0a149ee7a195a07c6b169f6d5ee6cdfcbcb022

R4_3m : http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7986153921349b7e22a32f0d6e991077a71f8004
Comment 13 Paul Elder CLA 2014-01-16 15:03:15 EST
Pushed another attempt at a fix to master:

https://git.eclipse.org/r/20724

Need to consider whether this still impacts bug 420742. Also, this fix appears to also fix bug 413977.
Comment 15 Paul Elder CLA 2014-01-17 14:21:41 EST
Marking as fixed on 4.4 M5. Cloned bug 426019 as a back port to 4.3.2
Comment 16 Paul Elder CLA 2014-01-21 09:52:50 EST
Verified in 4.4.0.I20140120-2000 on Win 7-64. Regressions from previous fixes (described in comment 11) tested on Mac OS X 10.9.1 and Unbuntu 12.04 (x86/64)