mirror of
https://github.com/codex-team/editor.js
synced 2024-06-09 09:22:16 +02:00
fix(caret): caret loosing on mobile devices
This commit is contained in:
parent
ea2be754e7
commit
fdffc5cbfc
|
@ -11,6 +11,7 @@
|
|||
- `Fix` — `blocks.render()` won't lead the `onChange` call in Safari
|
||||
- `Fix` — Editor wrapper element growing on the Inline Toolbar close
|
||||
- `Fix` — Fix errors thrown by clicks on a document when the editor is being initialized
|
||||
- `Fix` — Caret losing on Mobile Devices when adding a block via Toolbox or via Backspace at the beginning of a Block
|
||||
- `Fix` — Inline Toolbar sometimes opened in an incorrect position. Now it will be aligned by the left side of the selected text. And won't overflow the right side of the text column.
|
||||
|
||||
### 2.28.2
|
||||
|
|
|
@ -255,13 +255,7 @@ export default class Caret extends Module {
|
|||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo try to fix via Promises or use querySelectorAll to not to use timeout
|
||||
*/
|
||||
_.delay(() => {
|
||||
this.set(nodeToSet as HTMLElement, offset);
|
||||
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
||||
}, 20)();
|
||||
this.set(nodeToSet as HTMLElement, offset);
|
||||
|
||||
BlockManager.setCurrentBlockByChildNode(block.holder);
|
||||
BlockManager.currentBlock.currentInput = element;
|
||||
|
|
Loading…
Reference in a new issue