Skip to main content

Overview

The mouseUp() method releases the mouse button, completing a drag operation or custom mouse gesture that was started with mouseDown(). You can call it without parameters to release at the current mouse position.

Syntax

Parameters

None. The mouse button is released at the current cursor position.

Returns

Returns a Promise<void> that resolves when the mouse button is released.

Examples

Complete Drag and Drop

Selecting Multiple Files

Drawing Application

Resizing Window Panels

Drag to Reorder List Items

Text Selection with Mouse

Important Notes

  • mouseUp() must be preceded by mouseDown() to have an effect
  • Releases the button at the current cursor position
  • Completes any drag or selection operation that was in progress
  • For simple clicks, use click() instead of mouseDown/mouseUp pair