From 45ebffb8966088e26bbf1061a471bcda3d256c47 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Mon, 24 Jul 2017 16:19:45 +0200 Subject: [PATCH] Internal: The clickOutsideHandler helper should use mousedown instead of mouseup event (see ckeditor/ckeditor5-ui#281). --- tests/link.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/link.js b/tests/link.js index 9f8fe5a..7026b90 100644 --- a/tests/link.js +++ b/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 ); } );