Fix hinting in frames on qt5.9 with input ranges

This commit is contained in:
Jay Kamat 2018-03-13 18:54:08 -04:00
parent 8e01353a94
commit a6e94cf30c
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -74,9 +74,8 @@ window._qutebrowser.webelem = (function() {
try {
return elem.selectionStart;
} catch (err) {
if (err instanceof (frame
? frame.DOMException
: DOMException) &&
if ((err instanceof DOMException ||
(frame && err instanceof frame.DOMException)) &&
err.name === "InvalidStateError") {
// nothing to do, caret_position is already null
} else {