A common mistake made was overriding dispose and not calling super.dispose,
so a TS trick is now used to move it to a readonly property instead of a
member method which prevents it being overridden.
Add support for the parent element (what is passed to Terminal.open)
being in a different (same origin) window. Accesses to DOM APIs such
as requestAnimationFrame and devicePixelRatio thus need to be scoped
to the corrent window, instead of assuming that it's the same as the
window/global scope where the code is running.
This is done by inferring a parent window at the creation time, and
then storing it in CoreBrowserService, which is already passed to most
places that need it.
To catch future regressions, an ESLint rule that checks for global
accesses is added (it uses AST selectors via the no-restricted-syntax
rule).
This should also be applicable when the parent element is an iframe.
Fixes#3758
The following parts were not respecting the column selection edge case where the
start column was greater than the end column while the start row was less than the
end row:
- Webgl renderer
- DOM renderer
- Selection service (ie. getSelection(), I don't think this was a
regression)
Fixes#3855
Fire the onSelectionChange event when a selection is cleared by
single-clicking somewhere inside the terminal area.
fixes#3193.
This also slightly changes the behaviour when re-selecting the same area
in the terminal. Before, this fired onSelectionChange, but it does not
anymore, even when changing the direction of the selection.
This was happening as the devicePixelRatio wasn't being taken into account,
the fix was to rely on IRenderService to get the right canvas height.
Fixes#2833