Add missing click_target arg to _click_editable

This commit is contained in:
Florian Bruhin 2017-02-19 20:46:43 +01:00
parent ecf6e02ead
commit eb4d699be3
3 changed files with 4 additions and 4 deletions

View File

@ -359,7 +359,7 @@ class AbstractWebElement(collections.abc.MutableMapping):
self._tab.caret.move_to_end_of_document()
QTimer.singleShot(0, after_click)
def _click_editable(self):
def _click_editable(self, click_target):
"""Fake a click on an editable input field."""
raise NotImplementedError
@ -411,7 +411,7 @@ class AbstractWebElement(collections.abc.MutableMapping):
self._click_js(click_target)
elif self.is_editable(strict=True):
log.webelem.debug("Clicking via JS focus()")
self._click_editable()
self._click_editable(click_target)
modeman.enter(self._tab.win_id, usertypes.KeyMode.insert,
'clicking input')
else:

View File

@ -157,7 +157,7 @@ class WebEngineElement(webelem.AbstractWebElement):
self._id)
self._tab.run_js_async(js_code)
def _click_editable(self):
def _click_editable(self, click_target):
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-58515
# pylint doesn't know about Qt.MouseEventSynthesizedBySystem
# because it was added in Qt 5.6, but we can be sure we use that with

View File

@ -297,7 +297,7 @@ class WebKitElement(webelem.AbstractWebElement):
break
elem = elem._parent() # pylint: disable=protected-access
def _click_editable(self):
def _click_editable(self, click_target):
ok = self._elem.evaluateJavaScript('this.focus(); true;')
if not ok:
log.webelem.debug("Failed to focus via JS, falling back to event")