mirror of
https://github.com/codex-team/editor.js
synced 2026-03-15 07:05:48 +01:00
Fix loss of pointer (#666)
* Fix loss of pointer when click is outside of the editor but selection is inside * Remove log
This commit is contained in:
parent
7d1ce5912b
commit
a750894656
3 changed files with 9 additions and 6 deletions
2
dist/editor.js
vendored
2
dist/editor.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -2,11 +2,12 @@
|
|||
|
||||
### 2.12.4
|
||||
|
||||
- `Fix` — Do not start multi-block selection on Toolbox and Inline Toolbar
|
||||
- `Fix` — Do not start multi-block selection on Toolbox and Inline Toolbar [#646](https://github.com/codex-team/editor.js/issues/646)
|
||||
- `Fix` — Minor fixes of caret behaviour [#663](https://github.com/codex-team/editor.js/issues/663)
|
||||
|
||||
### 2.12.3
|
||||
|
||||
- `Fix` — Make Toolbox tooltip position font-size independent [#646](https://github.com/codex-team/editor.js/issues/646)
|
||||
- `Fix` — Make Toolbox tooltip position font-size independent
|
||||
|
||||
### 2.12.2
|
||||
|
||||
|
|
|
|||
|
|
@ -329,9 +329,9 @@ export default class UI extends Module {
|
|||
*/
|
||||
const target = event.target as HTMLElement;
|
||||
const clickedOnInlineToolbarButton = target.closest(`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`);
|
||||
const clickedInsideofEditor = target.closest(`#${this.config.holderId}`);
|
||||
const clickedInsideOfEditor = !!target.closest(`#${this.config.holderId}`) || Selection.isAtEditor;
|
||||
|
||||
if (!clickedInsideofEditor) {
|
||||
if (!clickedInsideOfEditor) {
|
||||
/**
|
||||
* Clear highlightings and pointer on BlockManager
|
||||
*
|
||||
|
|
@ -348,7 +348,9 @@ export default class UI extends Module {
|
|||
* Move inline toolbar to the focused Block
|
||||
*/
|
||||
this.Editor.InlineToolbar.handleShowingEvent(event);
|
||||
} else if (Selection.isAtEditor) {
|
||||
}
|
||||
|
||||
if (Selection.isAtEditor) {
|
||||
/**
|
||||
* Focus clicked Block
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue