API Docs for: 3.8.0
Show:

event-outside Module

User Guide & Examples
Defined in: event/js/outside.js:1

Available since 3.4.0

Outside events are synthetic DOM events that fire when a corresponding native or synthetic DOM event occurs outside a bound element.

The following outside events are pre-defined by this module:

  • blur
  • change
  • click
  • dblclick
  • focus
  • keydown
  • keypress
  • keyup
  • mousedown
  • mousemove
  • mouseout
  • mouseover
  • mouseup
  • select
  • submit

Define new outside events with Y.Event.defineOutside(eventType);. By default, the created synthetic event name will be the name of the event with "outside" appended (e.g. "click" becomes "clickoutside"). If you want a different name for the created Event, pass it as a second argument like so: Y.Event.defineOutside(eventType, "yonderclick").

This module was contributed by Brett Stimmerman, promoted from his gallery-outside-events module at http://yuilibrary.com/gallery/show/outside-events