Merge branch 'master' of ssh://cmpl.cc:2323/qutebrowser
Conflicts: qutebrowser/utils/webelem.py
This commit is contained in:
commit
23baab1fc0
2
doc/BUGS
2
doc/BUGS
@ -102,6 +102,8 @@ Bugs
|
|||||||
window has a bigger size hint instead of tabs getting smaller than the
|
window has a bigger size hint instead of tabs getting smaller than the
|
||||||
minimum size (iggy)
|
minimum size (iggy)
|
||||||
|
|
||||||
|
- Opening editor is broken on http://p.cmpl.cc/
|
||||||
|
|
||||||
- Segfault on subsonic when clicking next track
|
- Segfault on subsonic when clicking next track
|
||||||
|
|
||||||
- Assertion failure on subsonic with debug build
|
- Assertion failure on subsonic with debug build
|
||||||
|
@ -737,7 +737,11 @@ class CommandDispatcher:
|
|||||||
if elem.isNull():
|
if elem.isNull():
|
||||||
raise CommandError("Element vanished while editing!")
|
raise CommandError("Element vanished while editing!")
|
||||||
if webelem.is_content_editable(elem):
|
if webelem.is_content_editable(elem):
|
||||||
|
log.misc.debug("Filling element {} via setPlainText.".format(
|
||||||
|
webelem.debug_text(elem)))
|
||||||
elem.setPlainText(text)
|
elem.setPlainText(text)
|
||||||
else:
|
else:
|
||||||
|
log.misc.debug("Filling element {} via javascript.".format(
|
||||||
|
webelem.debug_text(elem)))
|
||||||
text = webelem.javascript_escape(text)
|
text = webelem.javascript_escape(text)
|
||||||
elem.evaluateJavaScript("this.value='{}'".format(text))
|
elem.evaluateJavaScript("this.value='{}'".format(text))
|
||||||
|
@ -249,7 +249,7 @@ def is_editable(elem, strict=False):
|
|||||||
# pylint: disable=too-many-return-statements
|
# pylint: disable=too-many-return-statements
|
||||||
roles = ('combobox', 'textbox')
|
roles = ('combobox', 'textbox')
|
||||||
log.misc.debug("Checking if element is editable: {}".format(
|
log.misc.debug("Checking if element is editable: {}".format(
|
||||||
compact_text(elem.toOuterXml(), 500)))
|
debug_text(elem)))
|
||||||
tag = elem.tagName().lower()
|
tag = elem.tagName().lower()
|
||||||
if is_content_editable(elem) and is_writable(elem):
|
if is_content_editable(elem) and is_writable(elem):
|
||||||
return True
|
return True
|
||||||
@ -279,3 +279,8 @@ def focus_elem(frame):
|
|||||||
frame: The QWebFrame to search in.
|
frame: The QWebFrame to search in.
|
||||||
"""
|
"""
|
||||||
return frame.findFirstElement(SELECTORS[Group.focus])
|
return frame.findFirstElement(SELECTORS[Group.focus])
|
||||||
|
|
||||||
|
|
||||||
|
def debug_text(elem):
|
||||||
|
"""Get a text based on an element suitable for debug output."""
|
||||||
|
return compact_text(elem.toOuterXml(), 500)
|
||||||
|
Loading…
Reference in New Issue
Block a user