mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3740 from overleaf/ae-safari-remove-event-listener
Add required arguments for removeEventListener in Safari GitOrigin-RevId: ad1cc79b12e56dc1019920964a93acbe1bec10ff
This commit is contained in:
parent
b8fc4b58ca
commit
3c2351c22f
1 changed files with 16 additions and 4 deletions
|
@ -50,13 +50,25 @@ export default SafariScrollPatcher = class SafariScrollPatcher {
|
||||||
|
|
||||||
// If elements aren't null, remove existing listeners.
|
// If elements aren't null, remove existing listeners.
|
||||||
if (this.pdfDiv != null) {
|
if (this.pdfDiv != null) {
|
||||||
this.pdfDiv.removeEventListener(this.handlePdfDivMouseLeave)
|
this.pdfDiv.removeEventListener(
|
||||||
this.pdfDiv.removeEventListener(this.handlePdfDivMouseEnter)
|
'mouseleave',
|
||||||
|
this.handlePdfDivMouseLeave
|
||||||
|
)
|
||||||
|
this.pdfDiv.removeEventListener(
|
||||||
|
'mouseenter',
|
||||||
|
this.handlePdfDivMouseEnter
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.aceDiv != null) {
|
if (this.aceDiv != null) {
|
||||||
this.aceDiv.removeEventListener(this.handleAceDivMouseLeave)
|
this.aceDiv.removeEventListener(
|
||||||
this.aceDiv.removeEventListener(this.handleAceDivMouseEnter)
|
'mouseleave',
|
||||||
|
this.handleAceDivMouseLeave
|
||||||
|
)
|
||||||
|
this.aceDiv.removeEventListener(
|
||||||
|
'mouseenter',
|
||||||
|
this.handleAceDivMouseEnter
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab elements.
|
// Grab elements.
|
||||||
|
|
Loading…
Reference in a new issue