rollback setCaret code duplication

This commit is contained in:
Peter Savchenko 2018-05-29 17:36:56 +03:00
commit fc442971c9
No known key found for this signature in database
GPG key ID: 63E739583C761566
3 changed files with 18 additions and 1 deletions

View file

@ -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

View file

@ -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
*/