spacer
Yehuda Shiran July 8, 2000
HTC-Master Focus/Blur Events
Tips: July 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

The focus and blur events are treated as special-case events in the communication model between a primary document and its HTC. The uniqueness stems from the requirement not to fire focus/blur events on the master element whenever a user changes focus between elements in a component. As a result, the focus/blur events are treated in exactly the same way as the mouse events. There are six focus/blur events in their occurrences' sequence: onbeforefocusenter, onfocusenter, onfocus, onbeforefocusleave, onfocusleave, and onblur.

The onfocusenter and onfocusleave events cannot be cancelled. When they fire on the root element of the HTC tree, the onfocus and onblur events, respectively, are fired on the master element in the primary document. The onbeforefocusenter and onbeforefocusleave events do not bubble but can be cancelled. Since they do not bubble, only occurrences of these events directly on the root element of the HTC tree are fired on the master element. But, because these events can be cancelled, focus on the master element can be cancelled.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business