mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-09 14:54:04 +02:00
Merge pull request #20934 from Snuffleupagus/fix-TextLayerBuilder-abortSignal
Ensure that `TextLayerBuilder` works correctly without the `abortSignal` parameter (PR 20928 follow-up)
This commit is contained in:
commit
d66629376e
@ -169,13 +169,14 @@ class TextLayerBuilder {
|
||||
#bindMouse(end) {
|
||||
const { div } = this;
|
||||
const abortSignal = this.#abortSignal;
|
||||
const opts = abortSignal ? { signal: abortSignal } : null;
|
||||
|
||||
div.addEventListener(
|
||||
"mousedown",
|
||||
() => {
|
||||
div.classList.add("selecting");
|
||||
},
|
||||
{ signal: abortSignal }
|
||||
opts
|
||||
);
|
||||
|
||||
div.addEventListener(
|
||||
@ -190,7 +191,7 @@ class TextLayerBuilder {
|
||||
}
|
||||
stopEvent(event);
|
||||
},
|
||||
{ signal: abortSignal }
|
||||
opts
|
||||
);
|
||||
|
||||
TextLayerBuilder.#textLayers.set(div, end);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user