Clear state when refreshing enabled state (#811)
This commit is contained in:
parent
a5845df123
commit
6e7b9fcf99
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user