File tree Expand file tree Collapse file tree
packages/tiptap/src/Plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class Menu {
1818
1919 // the mousedown event is fired before blur so we can prevent it
2020 this . mousedownHandler = this . handleClick . bind ( this )
21- this . options . element . addEventListener ( 'mousedown' , this . mousedownHandler )
21+ this . options . element . addEventListener ( 'mousedown' , this . mousedownHandler , { capture : true } )
2222
2323 this . options . editor . on ( 'focus' , ( { view } ) => {
2424 this . update ( view )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class Menu {
88
99 // the mousedown event is fired before blur so we can prevent it
1010 this . mousedownHandler = this . handleClick . bind ( this )
11- this . options . element . addEventListener ( 'mousedown' , this . mousedownHandler )
11+ this . options . element . addEventListener ( 'mousedown' , this . mousedownHandler , { capture : true } )
1212
1313 this . options . editor . on ( 'blur' , ( ) => {
1414 if ( this . preventHide ) {
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class Menu {
7171
7272 // the mousedown event is fired before blur so we can prevent it
7373 this . mousedownHandler = this . handleClick . bind ( this )
74- this . options . element . addEventListener ( 'mousedown' , this . mousedownHandler )
74+ this . options . element . addEventListener ( 'mousedown' , this . mousedownHandler , { capture : true } )
7575
7676 this . options . editor . on ( 'focus' , ( { view } ) => {
7777 this . update ( view )
You can’t perform that action at this time.
0 commit comments