Explorar el Código

Internal: The clickOutsideHandler helper should use mousedown instead of mouseup event (see ckeditor/ckeditor5-ui#281).

Aleksander Nowodzinski hace 8 años
padre
commit
45aa7b26c1
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      packages/ckeditor5-link/tests/link.js

+ 2 - 2
packages/ckeditor5-link/tests/link.js

@@ -568,7 +568,7 @@ describe( 'Link', () => {
 			const spy = testUtils.sinon.spy( linkFeature, '_hidePanel' );
 
 			linkFeature._showPanel( true );
-			document.body.dispatchEvent( new Event( 'mouseup', { bubbles: true } ) );
+			document.body.dispatchEvent( new Event( 'mousedown', { bubbles: true } ) );
 
 			sinon.assert.calledWithExactly( spy );
 		} );
@@ -577,7 +577,7 @@ describe( 'Link', () => {
 			const spy = testUtils.sinon.spy( linkFeature, '_hidePanel' );
 
 			linkFeature._showPanel( true );
-			balloon.view.element.dispatchEvent( new Event( 'mouseup', { bubbles: true } ) );
+			balloon.view.element.dispatchEvent( new Event( 'mousedown', { bubbles: true } ) );
 
 			sinon.assert.notCalled( spy );
 		} );