8
0
Эх сурвалжийг харах

Tuning of PageEditing to match generated PDF.

Kuba Niegowski 5 жил өмнө
parent
commit
16789e9a48

+ 7 - 2
packages/ckeditor5-utils/src/dom/emittermixin.js

@@ -187,10 +187,15 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 			return;
 			return;
 		}
 		}
 
 
-		const domListener = this._createDomListener( event, !!options.useCapture );
+		const listenerOptions = options.useCapture || options.usePassive ? {
+			capture: !!options.useCapture,
+			passive: !!options.usePassive
+		} : false;
+
+		const domListener = this._createDomListener( event, listenerOptions );
 
 
 		// Attach the native DOM listener to DOM Node.
 		// Attach the native DOM listener to DOM Node.
-		this._domNode.addEventListener( event, domListener, !!options.useCapture );
+		this._domNode.addEventListener( event, domListener, listenerOptions );
 
 
 		if ( !this._domListeners ) {
 		if ( !this._domListeners ) {
 			this._domListeners = {};
 			this._domListeners = {};