Deprecated module to monitor currently focused node and stack of currently focused widgets. New code should access dijit/focus directly.
See the dijit/_base/focus reference documentation for more information.
Retrieves a bookmark that can be used with moveToBookmark to return to the same range
Called as getFocus(), this returns an Object showing the current focus and selected text.
Called as getFocus(widget), where widget is a (widget representing) a button that was just pressed, it returns where focus was before that button was pressed. (Pressing the button may have either shifted focus to the button, or removed focus altogether.) In this case the selected text is not returned, since it can't be accurately determined.
Parameter | Type | Description |
---|---|---|
menu | Widget |
Optional The button that was just pressed. If focus has disappeared or moved to this button, returns the previous focus. In this case the bookmark information is already lost, and null is returned. |
openedForWindow | Window |
Optional iframe in which menu was opened |
A handle to restore focus/selection, to be passed to dijit.focus
Moves current selection to a bookmark
Parameter | Type | Description |
---|---|---|
bookmark | Object | This should be a returned object from dijit.getBookmark() |
Registers listeners on the specified iframe so that any click
or focus event on that iframe (or anything in it) is reported
as a focus/click event on the <iframe>
itself.
Currently only used by editor.
Parameter | Type | Description |
---|---|---|
iframe | DomNode |
Handle to pass to unregisterIframe()
Registers listeners on the specified window (either the main window or an iframe's window) to detect when the user has clicked somewhere or focused somewhere.
Users should call registerIframe() instead of this method.
Parameter | Type | Description |
---|---|---|
targetWindow | Window |
Optional If specified this is the window associated with the iframe, i.e. iframe.contentWindow. |
effectiveNode | DomNode |
Optional If specified, report any focus events inside targetWindow as an event on effectiveNode, rather than on evt.target. |
Handle to pass to unregisterWin()
Unregisters listeners on the specified iframe created by registerIframe. After calling be sure to delete or null out the handle itself.
Parameter | Type | Description |
---|---|---|
handle | Object | Handle returned by registerIframe() |
Unregisters listeners on the specified window (either the main window or an iframe's window) according to handle returned from registerWin(). After calling be sure to delete or null out the handle itself.
Parameter | Type | Description |
---|---|---|
handle | Handle |