Don't position caret if there is selection on page

This commit is contained in:
Artur Shaik 2015-06-18 19:47:33 +06:00 committed by Florian Bruhin
parent e2c375b874
commit 94d394001e

View File

@ -467,6 +467,7 @@ class WebView(QWebView):
# and refocusing it fixes that.
self.clearFocus()
self.setFocus(Qt.OtherFocusReason)
if len(self.page().selectedText()) == 0:
self.page().currentFrame().evaluateJavaScript(
utils.read_file('javascript/position_caret.js'))