Skip to content

Add MouseEnter & MouseMove Event in PopupCloser #2977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amartya4256
Copy link
Contributor

This commit adds MouseEnter and MouseMove event in the PopupCloser, as Edge browser can only react to mouse movements and not mouse clicks. This also makes the beahviour of PopupCloser consistent with AbstractHoverInformationControl:Closer.

See eclipse-platform/eclipse.platform.swt#1551

fixes eclipse-platform/eclipse.platform.swt#2072

Explanation: The reason why edge browser doesn't react to a mouse hover over the jvadoc tooltip is because the controller responsible for managing the javadoc tooltip in this case is AdditionalInfoController and the closer needed to replace the tooltip on the mouse event is a PopUpCloser. The PopUpCloser doesn't have any mouse movement events (MouseMove & MouseEnter) registered like AbstractHoverInformationControl:Closer (Which is responsible for javadoc tooltip on code hover), hence the javadoc tooltip is not replaced.

Fix: Simply register PopUpCloser with the MouseMove and MouseEnter events and handle these events to trigger the replacement of the control similar to AbstractHoverInformationControl:Closer.

This commit adds MouseEnter and MouseMove event in the PopupCloser, as
Edge browser can only react to mouse movements and not mouse clicks.
This also makes the beahviour of PopupCloser consistent with AbstractHoverInformationControl:Closer.

fixes eclipse-platform/eclipse.platform.swt#2072
Copy link
Contributor

Test Results

 1 824 files  ±0   1 824 suites  ±0   1h 36m 38s ⏱️ - 5m 25s
 7 925 tests ±0   7 697 ✅ ±0  228 💤 ±0  0 ❌ ±0 
23 862 runs  ±0  23 114 ✅ ±0  748 💤 ±0  0 ❌ ±0 

Results for commit 8b8dd8d. ± Comparison against base commit beb2de0.

@fedejeanne
Copy link
Contributor

The failing check seems unrelated and reminds me of eclipse-platform/eclipse.platform.releng.aggregator#2406. The error message this time is slightly different though:

13:48:57.785 [ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:4.0.13-SNAPSHOT:compare-version-with-baselines (compare-attached-artifacts-with-release) on project org.eclipse.e4.ui.workbench3: Baseline and reactor have the same fully qualified version, but different content
13:48:57.786 [ERROR] different

@merks / @iloveeclipse do you have any hints? Is the error safe to be ignored or should I try some fix? Thank you in advance

Copy link
Contributor

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine and I tested on Windows, everything is fine. I haven't tested on Linux or Mac yet.

I would still like to postpone merging this PR to the next M1. The reason for that is that the affected class is quite central and the logic involved is not trivial. Applying this PR means that now 2 additional mouse events are handled/propagated and since there are so many subclasses of IInformationControlExtension5 (which is official API) that could be receiving these 2 new events, this rather small change could have big repercussions in consumer code.

Also, the original issue (eclipse-platform/eclipse.platform.swt#2072) does have a functioning workaround and it's very easy: simply press the Tab key.

Last but not least, the (first) candidate build for M3 is going to be built today so there is no time to test it properly in the community. I'd hate to introduce some unforeseen bug just because we rushed this PR.

@vogella, @akurtakov I see that you were the last 2 people to do working changes to this class so I'd like to know what do you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] Can't click on JavaDoc popup, resize or scroll [Edge] JavaDoc does not react to hovering/clicking
2 participants