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 (this.pdfDiv != null) {
|
||||
this.pdfDiv.removeEventListener(this.handlePdfDivMouseLeave)
|
||||
this.pdfDiv.removeEventListener(this.handlePdfDivMouseEnter)
|
||||
this.pdfDiv.removeEventListener(
|
||||
'mouseleave',
|
||||
this.handlePdfDivMouseLeave
|
||||
)
|
||||
this.pdfDiv.removeEventListener(
|
||||
'mouseenter',
|
||||
this.handlePdfDivMouseEnter
|
||||
)
|
||||
}
|
||||
|
||||
if (this.aceDiv != null) {
|
||||
this.aceDiv.removeEventListener(this.handleAceDivMouseLeave)
|
||||
this.aceDiv.removeEventListener(this.handleAceDivMouseEnter)
|
||||
this.aceDiv.removeEventListener(
|
||||
'mouseleave',
|
||||
this.handleAceDivMouseLeave
|
||||
)
|
||||
this.aceDiv.removeEventListener(
|
||||
'mouseenter',
|
||||
this.handleAceDivMouseEnter
|
||||
)
|
||||
}
|
||||
|
||||
// Grab elements.
|
||||
|
|
Loading…
Reference in a new issue