mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-21 18:58:53 +00:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12083] Fix Select All in CODE bbcode with only one char
This commit is contained in:
commit
ef5eb72e8a
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