Skip to content

Commit

Permalink
[oy] Fix issue with w3c actions releasing on element (#5180)
Browse files Browse the repository at this point in the history
Releasing a held mouse button on an element
  • Loading branch information
xaircore authored and lmtierney committed Dec 7, 2017
1 parent c067d6b commit 2430a64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/selenium/webdriver/common/action_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ def release(self, on_element=None):
- on_element: The element to mouse up.
If None, releases on current mouse position.
"""
if on_element:
self.move_to_element(on_element)
if self._driver.w3c:
self.w3c_actions.pointer_action.release()
self.w3c_actions.key_action.pause()
else:
if on_element:
self.move_to_element(on_element)
self._actions.append(lambda: self._driver.execute(Command.MOUSE_UP, {}))
return self

Expand Down

0 comments on commit 2430a64

Please sign in to comment.