Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Internal: The clickOutsideHandler helper should use mousedown instead…
Browse files Browse the repository at this point in the history
… of mouseup event (see ckeditor/ckeditor5-ui#281).
  • Loading branch information
oleq authored and oskarwrobel committed Aug 7, 2017
1 parent 03faa9f commit 45ebffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
} );
Expand All @@ -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 );
} );
Expand Down

0 comments on commit 45ebffb

Please sign in to comment.