Skip to content

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.

@amartya4256 amartya4256 linked an issue May 13, 2025 that may be closed by this pull request
2 tasks
Copy link
Contributor

github-actions bot commented May 13, 2025

Test Results

 2 778 files  ±0   2 778 suites  ±0   1h 38m 49s ⏱️ +28s
 7 928 tests ±0   7 700 ✅ +1  228 💤 ±0  0 ❌  - 1 
23 337 runs  ±0  22 591 ✅ +1  746 💤 ±0  0 ❌  - 1 

Results for commit 70f04ae. ± Comparison against base commit e37e158.

♻️ This comment has been updated with latest results.

@fedejeanne
Copy link
Member

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
Member

@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.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

In general, I think this change is fine both from technical side (to support proper usage of Edge inside PopupCloser) as well as from UX perspective (to replace the information control when hovering over it).

Still, some thoughts/concerns on this:

  • The PopupCloser shows the information "Press Tabfrom proposal table or click to focus", which becomes invalid/incomplete with this change: it also receives focus when just hovering over it.
  • Regarding focus: would it be possible to only replace the control when hovering over it without giving it focus and would that make sense? I find it a bit strange that I change the focus control just by hovering as that's quite unusual. When pressing tab or clicking that's kind of expected but not when hovering.
  • When repeatedly hovering over the control, it seems to be replaced repeatedly (at least it flickers every time I click in the completion proposal popup and then hover over the additional information control). While that's fine when navigating via tab or when activating it by clicking into it, it's a bit strange that this repeatedly happens just on hovering over the already replaced additional information control, as you can see in this video:
    popup_closer

@amartya4256
Copy link
Contributor Author

amartya4256 commented Jun 3, 2025

In general, I think this change is fine both from technical side (to support proper usage of Edge inside PopupCloser) as well as from UX perspective (to replace the information control when hovering over it).

Still, some thoughts/concerns on this:

  • The PopupCloser shows the information "Press Tabfrom proposal table or click to focus", which becomes invalid/incomplete with this change: it also receives focus when just hovering over it.

Shall we change the description?

  • Regarding focus: would it be possible to only replace the control when hovering over it without giving it focus and would that make sense? I find it a bit strange that I change the focus control just by hovering as that's quite unusual. When pressing tab or clicking that's kind of expected but not when hovering.

Implemented

  • When repeatedly hovering over the control, it seems to be replaced repeatedly (at least it flickers every time I click in the completion proposal popup and then hover over the additional information control). While that's fine when navigating via tab or when activating it by clicking into it, it's a bit strange that this repeatedly happens just on hovering over the already replaced additional information control, as you can see in this video:
  • This happens because when you click back on the proposal, it replaces the already replaced control with the stage 1 control again (The one with no scroll bar) and then when you go back to the browser window it gets replaced again - leading to an extra replacement. It is identical behaviour to on IE with replace only on mouse Up. I tested it out. Although the replacement is super quick now the moment the cursor goes inside the browser window, that's why it feels snappy. I could potentially try to prevent it if it is possible. But I would propose we do that in a separate issue as an enhancement over the the mouse hover because we need to test this bheaviour for PopUpCloser with all the other consumer first and once we are sure, its not causing any problem, we can move ahead with enhancing it further.

@amartya4256 amartya4256 force-pushed the amartya4256/popupCloser_mouse_move_and_enter_fix branch from 8b8dd8d to 68256d6 Compare June 3, 2025 12:14
@HeikoKlare
Copy link
Contributor

The PopupCloser shows the information "Press Tabfrom proposal table or click to focus", which becomes invalid/incomplete with this change: it also receives focus when just hovering over it.

Shall we change the description?

Yes, we need to do that.

When repeatedly hovering over the control, it seems to be replaced repeatedly (at least it flickers every time I click in the completion proposal popup and then hover over the additional information control). While that's fine when navigating via tab or when activating it by clicking into it, it's a bit strange that this repeatedly happens just on hovering over the already replaced additional information control, as you can see in this video:

This happens because when you click back on the proposal, it replaces the already replaced control with the stage 1 control again (The one with no scroll bar) and then when you go back to the browser window it gets replaced again - leading to an extra replacement. It is identical behaviour to on IE with replace only on mouse Up. I tested it out. Although the replacement is super quick now the moment the cursor goes inside the browser window, that's why it feels snappy. I could potentially try to prevent it if it is possible. But I would propose we do that in a separate issue as an enhancement over the the mouse hover because we need to test this bheaviour for PopUpCloser with all the other consumer first and once we are sure, its not causing any problem, we can move ahead with enhancing it further.

You are right. I was moving the mouse too fast so it looked a bit weird. But the behavior as you describe it totally makes sense and in my opinion is nothing we should/need to fix.

@amartya4256 amartya4256 force-pushed the amartya4256/popupCloser_mouse_move_and_enter_fix branch from 68256d6 to 26bc62b Compare June 12, 2025 12:04
@amartya4256 amartya4256 force-pushed the amartya4256/popupCloser_mouse_move_and_enter_fix branch from 26bc62b to f640247 Compare June 23, 2025 09:03
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
@fedejeanne fedejeanne force-pushed the amartya4256/popupCloser_mouse_move_and_enter_fix branch from f640247 to 1fdedbf Compare June 24, 2025 10:41
@eclipse-platform-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF

Warning

🚧 This PR cannot be modified by maintainers because edits are disabled or it is created from an organization repository. To obtain the required changes apply the git patch manually as an additional commit.

Git patch
From d5021a50a25b3569e38c1e3f9009bf71cd02c453 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Tue, 24 Jun 2025 10:46:53 +0000
Subject: [PATCH] Version bump(s) for 4.37 stream


diff --git a/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF
index a85e3b30fe..ada22acef2 100644
--- a/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.editors; singleton:=true
-Bundle-Version: 3.20.0.qualifier
+Bundle-Version: 3.20.100.qualifier
 Bundle-Activator: org.eclipse.ui.internal.editors.text.EditorsPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
-- 
2.49.0

Further information are available in Common Build Issues - Missing version increments.

@fedejeanne fedejeanne merged commit f7d94e2 into eclipse-platform:master Jun 25, 2025
16 of 18 checks passed
@fedejeanne fedejeanne deleted the amartya4256/popupCloser_mouse_move_and_enter_fix branch June 25, 2025 06:03
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

4 participants