NPAPI:AdvancedKeyHandling: Difference between revisions

Jump to navigation Jump to search
Line 104: Line 104:
* Situations to consider:
* Situations to consider:
** Plugin is the only object in the tab chain for the window, last element inside plugin is focused and user hits tab.
** Plugin is the only object in the tab chain for the window, last element inside plugin is focused and user hits tab.
*** Plugin should call <tt>NPN_GiveUpFocus</tt>, browser should return <tt>true</tt> and then call <tt>NPP_GotFocus</tt> with <tt>NPFocusNext</tt> for the direction argument to return focus to the first element in the plugin. If the browser does not want focus to wrap around then it can return <tt>false</tt> for the <tt>NPN_GiveUpFocus</tt> call.
*** Plugin should call <tt>NPN_GiveUpFocus</tt> in response to the tab event, browser should return <tt>true</tt> and then call <tt>NPP_GotFocus</tt> with <tt>NPFocusNext</tt> for the direction argument to return focus to the first element in the plugin. If the browser does not want focus to wrap around then it can return <tt>false</tt> for the <tt>NPN_GiveUpFocus</tt> call. Plugin does not pass the tab event to the browser either way.


= Past Proposals and Commentary =
= Past Proposals and Commentary =
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits

Navigation menu