Fix the cleanup of event handlers (#2298)

We probably don't want to add the listener here.

### Change Type

- [x] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
This commit is contained in:
Mitja Bezenšek 2023-12-06 17:19:31 +01:00 committed by GitHub
parent 49f0f7f200
commit ea83e45942
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ export function useFixSafariDoubleTapZoomPencilEvents(ref: React.RefObject<HTMLE
elm.addEventListener('touchend', handleEvent)
return () => {
elm.removeEventListener('touchstart', handleEvent)
elm.addEventListener('touchend', handleEvent)
elm.removeEventListener('touchend', handleEvent)
}
}, [editor, ref])
}