mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12083] Fix Select All in CODE bbcode with only one char
PHPBB3-12083
This commit is contained in:
parent
d0aa7c6455
commit
7e6d6a6be6
1 changed files with 3 additions and 2 deletions
|
@ -184,9 +184,10 @@ function selectCode(a) {
|
|||
// Not IE and IE9+
|
||||
if (window.getSelection) {
|
||||
s = window.getSelection();
|
||||
// Safari
|
||||
// Safari and Chrome
|
||||
if (s.setBaseAndExtent) {
|
||||
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
|
||||
var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
|
||||
s.setBaseAndExtent(e, 0, e, l);
|
||||
}
|
||||
// Firefox and Opera
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue