Confirmed users, Bureaucrats and Sysops emeriti
1,680
edits
Line 32: | Line 32: | ||
'''NPAPI Advanced Key Handling (AKH) Support''' | '''NPAPI Advanced Key Handling (AKH) Support''' | ||
* Last modified: March | * Last modified: March 17, 2009 | ||
* Author: Josh Aas, Mozilla Corporation | * Author: Josh Aas, Mozilla Corporation | ||
* Contributors: Johnny Stenback (Mozilla), Aaron Leventhal (IBM), Oliver Yeoh (Sun), Danielle Pham (Sun), Deneb Mateka (Adobe), Anders Carlsson (Apple) | * Contributors: Johnny Stenback (Mozilla), Aaron Leventhal (IBM), Oliver Yeoh (Sun), Danielle Pham (Sun), Deneb Mateka (Adobe), Anders Carlsson (Apple) | ||
Line 82: | Line 82: | ||
</pre> | </pre> | ||
When a plugin takes focus, it will receive an <tt>NPP_GotFocus</tt> call before receiving | When a plugin takes focus, it will receive an <tt>NPP_GotFocus</tt> call before receiving any events that might have given it focus, such as a mouse click. The plugin may not receive the event that gave it focus if the browser considers itself to have handled the event by giving focus to the plugin. For example, the browser may handle a tab key press by giving focus to the plugin and having handled the event, not send the tab key to the plugin. | ||
If a plugin receives an event that causes it to attempt to give up focus, the plugin should simply call NPN_GiveUpFocus and not pass on the event since attempting to give up focus is essentially handling the event. | If a plugin receives an event that causes it to attempt to give up focus, the plugin should simply call NPN_GiveUpFocus and not pass on the event since attempting to give up focus is essentially handling the event. |