-
Notifications
You must be signed in to change notification settings - Fork 177
Edge: Implement mouse-related event listener support #2097
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
base: master
Are you sure you want to change the base?
Conversation
May this fix ...? |
Not sure. I just remember that we've been down this road before. The problem is that if we disable JavaScript via |
Is this still being considered? |
Yes, we still have #2164 and just had an offline talk about how we want to proceed with this a few weeks ago. I expect that we proceed with this or have something else supercede it in the next weeks. |
0d75c70
to
b17cd3f
Compare
As discussed offline, I changed the implementation to keep the fallback in place
|
- MouseListener up down doubleClick - MouseMoveListener move - MouseTrackListener exit enter - MouseWheelListener scroll - DragDetectListener dragDetected The implementation is JavaScript-based by attaching listeners to the DOM for all relevant events and forwarding them to the WebView via window.chrome.webview.postMessage(). The event handling is analogous to IE's IE#handleDOMEvent(org.eclipse.swt.ole.win32.OleEvent). Note: Since the implementation is JavaScript-based, this requires JavaScript to be enabled on the Browser instance. When JavaScript is disabled, we keep using the timer-based fallback implementation introduced in eclipse-platform#1551. As JavaScript is only truly enabled *after* navigation has finished, we also keep using this workaround when the Browser is first instantiated and before the first page has loaded. This change also fixes the jsEnabled flag lifecycle by updating it in handleNavigationCompleted(), same as in IE. This resolves eclipse-platform#2164 as long as JavaScript is enabled.
b17cd3f
to
c8ac9dd
Compare
MouseListener
MouseMoveListener
MouseTrackListener
MouseWheelListener
DragDetectListener
The implementation is JavaScript-based by attaching listeners to the DOM for all relevant events and forwarding them to the WebView via
window.chrome.webview.postMessage()
.The event handling is analogous to IE's
IE#handleDOMEvent(org.eclipse.swt.ole.win32.OleEvent)
.Note: Since the implementation is JavaScript-based, this requires JavaScript to be enabled on the Browser instance.
When JavaScript is disabled, we keep using the timer-based fallback implementation introduced in #1551.
As JavaScript is only truly enabled after navigation has finished, we also keep using this workaround when the Browser is first instantiated and before the first page has loaded.
This change also fixes the jsEnabled flag lifecycle by updating it in
handleNavigationCompleted()
, same as in IE.This resolves #2164 as long as JavaScript is enabled.