mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge remote-tracking branch 'vsephpbb/ticket/12083' into develop-ascraeus
* vsephpbb/ticket/12083: [ticket/12083] Fix Select All in CODE bbcode with only one char
This commit is contained in:
commit
e11d833dcd
1 changed files with 3 additions and 2 deletions
|
@ -184,9 +184,10 @@ function selectCode(a) {
|
||||||
// Not IE and IE9+
|
// Not IE and IE9+
|
||||||
if (window.getSelection) {
|
if (window.getSelection) {
|
||||||
s = window.getSelection();
|
s = window.getSelection();
|
||||||
// Safari
|
// Safari and Chrome
|
||||||
if (s.setBaseAndExtent) {
|
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
|
// Firefox and Opera
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue