mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-18 02:58:41 +00:00
CS fixes
This commit is contained in:
parent
340cda9c1e
commit
b69556e07e
|
|
@ -31,10 +31,9 @@
|
|||
const activeEl = document.activeElement;
|
||||
const activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null;
|
||||
|
||||
if (
|
||||
(activeElTagName === 'textarea' || activeElTagName === 'input') &&
|
||||
/^(?:text|search|password|tel|url)$/i.test(activeEl.type) &&
|
||||
(typeof activeEl.selectionStart === 'number')
|
||||
if ((activeElTagName === 'textarea' || activeElTagName === 'input')
|
||||
&& /^(?:text|search|password|tel|url)$/i.test(activeEl.type)
|
||||
&& (typeof activeEl.selectionStart === 'number')
|
||||
) {
|
||||
text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd);
|
||||
} else if (window.getSelection) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user