Name: mouseRelease

Type: message

Syntax: mouseRelease <pButtonNumber>

Summary:
Sent when the user releases the mouse outside the <control> that was
clicked. 

Associations: stack, card, field, button, graphic, scrollbar, player,
image

Introduced: 1.0

OS: mac, windows, linux, ios, android, html5

Platforms: desktop, server, mobile

Example:
on mouseRelease theButton
  if theButton is 1 then send "mouseUp" to the target
  else pass mouseRelease
end mouseRelease

Parameters:
pButtonNumber (enum): Specifies which mouse button was pressed:
- "1": the left button on systems with a multi-button mouse and the mouse button on Mac OS systems with a single-button mouse.
- "2": the middle button on systems with a three-button mouse.
- "3": the right button on systems with a multi-button mouse and  Control-click on Mac OS systems with a single-button mouse.

Description:
Handle the <mouseRelease> <message> to perform an action when the user
releases the <mouse button> after clicking and then dragging outside the
<control>. 

The <mouseRelease> <message> is sent to the <control> that was
originally clicked, or to the <card> if no <control> was under the
<mouse pointer>.

The <mouseRelease> <message> is sent only when the <Browse tool> is
being used.

If an unlocked field is clicked with mouse button 1 or 2, no
<mouseRelease> <message> is sent.

If the <control> is a <field> with its <listBehavior> <property> set to true,
the <mouseRelease> <message> is sent when the <mouse button> is released
and the mouse is not over a text line in the <field>, even if the mouse
is still over the <field>.

If the mouse is released while it's still within the <control> that was
clicked, a mouseUp <message> is sent instead of <mouseRelease>.

References: Browse tool (glossary), card (glossary), control (glossary), 
dragEnd (message), field (glossary), listBehavior (property), 
message (glossary), mouse button (glossary), mouse pointer (glossary), 
mouseStillDown (message), property (glossary), send (command)

Tags: ui

