Only catch the correct exception
This commit is contained in:
parent
3fd7fb3e14
commit
ae2dad7d18
@ -53,7 +53,9 @@ window._qutebrowser.webelem = (function() {
|
|||||||
try {
|
try {
|
||||||
caret_position = elem.selectionStart;
|
caret_position = elem.selectionStart;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// nothing to do, caret_position is already 0
|
if (e instanceof DOMException && e.name === "InvalidStateError") {
|
||||||
|
// nothing to do, caret_position is already 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var out = {
|
var out = {
|
||||||
|
Loading…
Reference in New Issue
Block a user