mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-09 11:24:35 +02:00
Merge branch '3.1.x'
* 3.1.x: [ticket/14077] Fall back to 1 as focusOffset if length is unsupported
This commit is contained in:
@ -156,7 +156,11 @@ function selectCode(a) {
|
|||||||
// Safari and Chrome
|
// Safari and Chrome
|
||||||
if (s.setBaseAndExtent) {
|
if (s.setBaseAndExtent) {
|
||||||
var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
|
var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
|
||||||
|
try {
|
||||||
s.setBaseAndExtent(e, 0, e, l);
|
s.setBaseAndExtent(e, 0, e, l);
|
||||||
|
} catch (error) {
|
||||||
|
s.setBaseAndExtent(e, 0, e, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Firefox and Opera
|
// Firefox and Opera
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user