diff --git a/py/selenium/webdriver/common/action_chains.py b/py/selenium/webdriver/common/action_chains.py
index <HASH>..<HASH> 100644
--- a/py/selenium/webdriver/common/action_chains.py
+++ b/py/selenium/webdriver/common/action_chains.py
@@ -331,12 +331,12 @@ class ActionChains(object):
          - 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
[oy] Fix issue with w3c actions releasing on element (#<I>)

Releasing a held mouse button on an element