DomTerm
DomTerm copied to clipboard
problems on WebKit/WebKitGtk
WebKit-based browsers (at least WebKitGtk) have some extra issues. This affects Gnome Web (Epiphany), Wry, WebView.
-
Neither
beforeunloadorpagehideevent is fired on window close, which means we don't sendCLOSE-SESSIONto the backend. This makes it harder to cleanly shutdown - we can't distinguish window-close from connection failure. The work-around is to close the session when the WebSocket connection closes. A possible fix is to detect whether the brower-application exited. If using a custom titlebar, we can catch click on the (custom) close button. -
The
toggle-minimizecommand doesn't work due to this issue. -
Gtk defaults to "overlay scrollbars". These save space but make it impossible to click in the rightmost column. Either disable overlay scrollbars (
gtk_scrolled_window_set_overlay_scrolling); add extra padding on the right; or make sure nothing needs to be clicked in the right column (including rethinking shell-integration show/hide buttons).Setting
GTK_OVERLAY_SCROLLING=0works for Gtk3 (but is supposedly ignored for Gtk4). This is now done automatically forwryandwebviewfront-ends. -
setDragImagedoesn't handle the x-offset and y-offset arguments correctly.This has been fixed upstream but may take a while to percolate to distributions.
The following used to be a problem, but appears to be fixed in webkitgtk-2.34.5 / appleWebKit:-605.1.15:
-
Setting
white-space: predoesn't work if an ancestor iscontenteditable. See bug report. Instead, the data is wrapped. This meansinsertSimpleOutputdoesn't realize it needs to insert a soft line-break.It seems to work to not set
contenteditableon thetopNode. I believe it was set as a partial (Chrome-specific) work-around for the lack use 'user-select: contain` in info-widgets. It might be better to use an iframe for each info-widget - but correctly sizing the widgets is more complicated.
I removed this sub-issue. The fix has made it to Fedora 37, at least.
setDragImagedoesn't handle the x-offset and y-offset arguments correctly. This has been fixed upstream but may take a while to percolate to distributions.
I removed this sub-issue. Fixed (for Wry front-end) by having the front-end detect window-close, and communicate with the server.
- Neither
beforeunloadorpagehideevent is fired on window close, which means we don't sendCLOSE-SESSIONto the backend. This makes it harder to cleanly shutdown - we can't distinguish window-close from connection failure. The work-around is to close the session when the WebSocket connection closes. A possible fix is to detect whether the brower-application exited. If using a custom titlebar, we can catch click on the (custom) close button.
I think this is working well enough now to close the issue. There are still things to fix - most critically we don't have proper menubar support on macOS.