Use ctrl-enter in all cases
This commit is contained in:
parent
de127497a2
commit
315ed519ee
@ -337,8 +337,10 @@ class WebEngineCaret(browsertab.AbstractCaret):
|
||||
return
|
||||
if js_elem == "focused":
|
||||
# we had a focused element, not a selected one. Just send <enter>
|
||||
self._tab.key_press(Qt.Key_Enter)
|
||||
return
|
||||
if tab:
|
||||
self._tab.key_press(Qt.Key_Enter, modifier=Qt.ControlModifier)
|
||||
else:
|
||||
self._tab.key_press(Qt.Key_Enter)
|
||||
|
||||
assert isinstance(js_elem, dict), js_elem
|
||||
elem = webengineelem.WebEngineElement(js_elem, tab=self._tab)
|
||||
|
@ -389,10 +389,14 @@ class WebKitCaret(browsertab.AbstractCaret):
|
||||
selection = self._widget.selectedHtml()
|
||||
if not selection:
|
||||
# Getting here may mean we crashed, but we can't do anything
|
||||
# about that:
|
||||
# about that until this commit is released:
|
||||
# https://github.com/annulen/webkit/commit/0e75f3272d149bc64899c161f150eb341a2417af
|
||||
# TODO find a way to check if something is focused
|
||||
self._tab.key_press(Qt.Key_Enter)
|
||||
if tab:
|
||||
self._tab.key_press(Qt.Key_Enter,
|
||||
modifier=Qt.ControlModifier)
|
||||
else:
|
||||
self._tab.key_press(Qt.Key_Enter)
|
||||
return
|
||||
try:
|
||||
selected_element = xml.etree.ElementTree.fromstring(
|
||||
|
Loading…
Reference in New Issue
Block a user