mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-28 22:41:13 -05:00
update: don't select bbcode tags if nothing is selected
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
input.dispatchEvent(new Event('input'));
|
||||
input.focus();
|
||||
if (openTag.charAt(openTag.length - 2) === '=') {
|
||||
input.setSelectionRange(start + openTag.length - 2, start + openTag.length - 2);
|
||||
input.setSelectionRange(start + openTag.length - 1, start + openTag.length - 1);
|
||||
} else if (start == end) {
|
||||
input.setSelectionRange(start + openTag.length, end + openTag.length);
|
||||
} else {
|
||||
input.setSelectionRange(start, end + openTag.length + closeTag.length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user