Clear state when refreshing enabled state (#811)

This commit is contained in:
toasted-nutbread 2020-09-11 18:44:53 -04:00 committed by GitHub
parent a5845df123
commit 6e7b9fcf99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,14 @@ class TextScanner extends EventDispatcher {
setEnabled(enabled) { setEnabled(enabled) {
this._eventListeners.removeAllEventListeners(); this._eventListeners.removeAllEventListeners();
this._primaryTouchIdentifier = null;
this._preventNextContextMenu = false;
this._preventNextMouseDown = false;
this._preventNextClick = false;
this._preventScroll = false;
this._enabled = enabled; this._enabled = enabled;
if (this._enabled && this._isPrepared) { if (this._enabled && this._isPrepared) {
this._hookEvents(); this._hookEvents();
} else { } else {