mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
No need to fallback to zero, delay must be non-zero for the setTimeout to be run
This commit is contained in:
parent
1b633ede21
commit
30ede21d46
|
@ -155,7 +155,7 @@ es.SurfaceView.prototype.updateSelection = function( delay ) {
|
|||
_this.documentView.clearSelection( _this.currentSelection );
|
||||
}
|
||||
_this.updateSelectionTimeout = undefined;
|
||||
}, delay || 0 );
|
||||
}, delay );
|
||||
} else {
|
||||
if ( this.currentSelection.from !== this.currentSelection.to ) {
|
||||
this.hideCursor();
|
||||
|
@ -176,7 +176,7 @@ es.SurfaceView.prototype.emitUpdate = function( delay ) {
|
|||
this.emitUpdateTimeout = setTimeout( function() {
|
||||
_this.emit( 'update' );
|
||||
_this.emitUpdateTimeout = undefined;
|
||||
}, delay || 0 );
|
||||
}, delay );
|
||||
} else {
|
||||
this.emit( 'update' );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue