question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scrolling in interactive terminal UI (FAR Manager)

See original GitHub issue

When using a console UI tool like FAR Manager, scrolling seems to throw a Unable to preventDefault inside passive event listener invocation.. I can scroll without errors when I’m not in this terminal UI.

I’ve seen a few other cases/fixes surrounding this but none seem to address this in particular:

https://github.com/xtermjs/xterm.js/pull/2931 https://github.com/xtermjs/xterm.js/issues/3004 https://github.com/xtermjs/xterm.js/issues/3110

I’ve tried altering xterm.js code to remove the preventDefault in the wheel scroll, and that does seem to stop it, however it then tosses the error when I’m out of the terminal UI.

The line that errors: https://github.com/xtermjs/xterm.js/blob/80d4742ded8029ee9e95aec53200f00d6ce2c569/src/browser/Terminal.ts#L702

Details

  • Browser and browser version: Chrome Version 94.0.4606.81 (Official Build) (64-bit)
  • OS version: Microsoft Windows 10 Enterprise Release [2009] Version 21H1
  • xterm.js version: xterm 4.14.1

Steps to reproduce

  1. Setup a basic connection to a PTY session
  2. Start a UI that has scrolling like FAR manager

See image:

output-onlinegiftools

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
jhermancommented, Nov 12, 2021

Just wanted to circle back. I reverted my workaround regarding angular zone.js and updated to xtermjs 4.15.0. I no longer get the errors presented in the debugger console. Cheers!

1reaction
jerchcommented, Oct 21, 2021

@jherman preventDefault() and stopPropagation() are related, but dont do the same (thats a common misconception found in the internet). preventDefault() tells the browser not to call its standard handler, while stopPropagation() stops the event from cascading through the surrounding DOM elements in capture/bubble phase. Breaking the bubbling chain can avoid the standard handler as a side effect, if the browser has registered it on a parent element, but thats not always the case.

Some how passive is being set to true. This at least explains why that error is being thrown.

Thx for checking again. Indeed we have one wheel handler with passive: true, and its behavior is not quite right. The wheel event handlers are a bit convoluted, created https://github.com/xtermjs/xterm.js/issues/3518 to fix that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove scrollbars from Far Manager after resizing ...
Run it from Far Manager, use arrow keys to resize the console, exit and Far Manager will fill the window without scrollbars. Share....
Read more >
Scrollable Console Buffer - FAR Manager
Hi! All! :) I Ask You If It's Possible To Have A More Longer Buffer To Scroll When You Press CTRL O Key...
Read more >
far-manager | Pavel's Blog
You can still turn it off by opening Options menu, then Interface settings: ... Once Far Manager is inside ConEmu tab you can...
Read more >
Accessible Overflow - marcus.io
Without any changes in the HTML, overflowing content is not scrollable with the keyboard (unless, of course, there is an interactive element ...
Read more >
Scrolling on the web: A primer - Microsoft Edge Blog
Today, scrolling is still the most fundamental interaction on the web, ... frequently referred to as the “main thread” or “UI thread.”.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found