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:
Miguel Serrano 2021-03-10 13:18:25 +01:00 committed by Copybot
parent b8fc4b58ca
commit 3c2351c22f

View file

@ -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.