mirror of
https://github.com/codex-team/editor.js
synced 2026-03-17 08:05:47 +01:00
rollback setCaret code duplication
This commit is contained in:
parent
768348fb85
commit
fc442971c9
3 changed files with 18 additions and 1 deletions
|
|
@ -2492,6 +2492,14 @@ var Caret = function (_Module) {
|
|||
|
||||
offset = nodeToSet.length;
|
||||
}
|
||||
|
||||
/** if found deepest node is native input */
|
||||
if ($.isNativeInput(nodeToSet)) {
|
||||
|
||||
nodeToSet.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo try to fix via Promises or use querySelectorAll to not to use timeout
|
||||
*/
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -54,6 +54,15 @@ export default class Caret extends Module {
|
|||
offset = nodeToSet.length;
|
||||
|
||||
}
|
||||
|
||||
/** if found deepest node is native input */
|
||||
if ($.isNativeInput(nodeToSet)) {
|
||||
|
||||
nodeToSet.focus();
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo try to fix via Promises or use querySelectorAll to not to use timeout
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue