@@ -515,6 +515,9 @@ export default class UI extends Module {
515
515
* Fired before click
516
516
*
517
517
* Used to change current block — we need to do it before 'selectionChange' event.
518
+ * Also:
519
+ * - Move and show the Toolbar
520
+ * - Set a Caret
518
521
*/
519
522
private documentTouched ( event : MouseEvent | TouchEvent ) : void {
520
523
let clickedNode = event . target as HTMLElement ;
@@ -550,6 +553,16 @@ export default class UI extends Module {
550
553
this . Editor . Caret . setToTheLastBlock ( ) ;
551
554
}
552
555
}
556
+
557
+ /**
558
+ * Move and open toolbar
559
+ */
560
+ this . Editor . Toolbar . open ( ) ;
561
+
562
+ /**
563
+ * Hide the Plus Button
564
+ */
565
+ this . Editor . Toolbar . plusButton . hide ( ) ;
553
566
}
554
567
555
568
/**
@@ -558,12 +571,9 @@ export default class UI extends Module {
558
571
* @param {MouseEvent } event
559
572
*
560
573
* @description
561
- * - Move and show the Toolbar
562
- * - Set a Caret
563
574
* - By clicks on the Editor's bottom zone:
564
575
* - if last Block is empty, set a Caret to this
565
576
* - otherwise, add a new empty Block and set a Caret to that
566
- * - Hide the Inline Toolbar
567
577
*/
568
578
private redactorClicked ( event : MouseEvent ) : void {
569
579
if ( ! Selection . isCollapsed ) {
@@ -573,16 +583,6 @@ export default class UI extends Module {
573
583
event . stopImmediatePropagation ( ) ;
574
584
event . stopPropagation ( ) ;
575
585
576
- /**
577
- * Move and open toolbar
578
- */
579
- this . Editor . Toolbar . open ( ) ;
580
-
581
- /**
582
- * Hide the Plus Button
583
- */
584
- this . Editor . Toolbar . plusButton . hide ( ) ;
585
-
586
586
if ( ! this . Editor . BlockManager . currentBlock ) {
587
587
this . Editor . BlockManager . insert ( ) ;
588
588
}
0 commit comments