Xterm.js: Right click generating an error

Created on 31 Oct 2016  Â·  5Comments  Â·  Source: xtermjs/xterm.js

New xterm is working fine for me, scrollbar works, mousescroll works, click drag works, but right click generates an error ...

xterm.js:484 Uncaught DOMException: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index.(…)
rightClickHandler @ xterm.js:484
(anonymous function) @ xterm.js:653

Details

  • Browser and browser version: Google Chrome (latest)
  • OS version: Ubuntu 16.04
  • xterm.js version: Version in /dist as of today

Steps to reproduce

  1. Right click on an active xterm.js scrollbar
typbug

All 5 comments

Thanks for reporting @oddjobz. Taking a look. Did you have any text selected when right-clicked?

Nope, the xterm is sat in a gridstack which grabs the mouse, so selecting text isn't possible ..

@oddjobz I just pushed 00dcb4f6e3f23139cc638c3061f97a2e999f27ad at #332, which hopefully fixes your issue.

Can you test this out by following these steps?

  1. Checking out xterm.js to 00dcb4f6e3f23139cc638c3061f97a2e999f27ad
  2. Building it (npm install && BUILD_DIR=dist npm run build)
  3. Reloading your page

Yes, that fixed it!
Many thanks!!

Great. After it gets a successful code review we will merge it into master and it will make it to 2.1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tyriar picture Tyriar  Â·  4Comments

chris-tse picture chris-tse  Â·  4Comments

7PH picture 7PH  Â·  4Comments

goxr3plus picture goxr3plus  Â·  3Comments

circuitry2 picture circuitry2  Â·  4Comments