mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
b7a5dea0a0
This is a bit janky. The problem is that we were placing the `xterm-viewport` div, which contains the scroll observer for the xterm contents, at a higher z-index than the xterm contents, meaning that the contents couldn't register any pointer events. If we don't put a z-index, though, the scroll bar can't accept pointer events. To get around this, I've added two observer divs, which control whether the contents or the viewport have pointer event priority. The first div, the `term-scrollbar-show-observer`, sits above where the scrollbar will be rendered. When the user hovers over it, it will cause the viewport div to move to a z-index above the contents. It will also enable a second div, the `term-scrollbar-hide-observer`, which sits above the viewport and the term contents, but not blocking the scrollbar. When the user hovers over this div (indicating their mouse has left the scrollbar), the viewport div is moved back to its original z-index and the hide observer is set to `display: none`. This gives pointer event priority back to the contents div. This resolves an issue where the user could not click links in the terminal output. Resolves #1357 |
||
---|---|---|
.. | ||
app | ||
layout | ||
types | ||
util | ||
wave.ts |