This mixin provides both the ability to request the suppression of keyboard events that are handled by
the dijit/_KeyNavContainer mixin and the ability to perform the actual suppression. As such this should
always be mixed into a module after dijit/_KeyNavContainer as it overrides some of its functions.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Members
-
suppressKeyNavigation :boolean
-
The ability to suppress keyboard navigation (e.g. the ability to move around the rendered list of items using the keyboard) has been added to support widgets that allow inline editing (such as the InlineEditProperty widget). In order to allow their keyboard events to bubble up to the browser, this widget needs to stop searching for keyboard navigation matches.
Type:
- boolean
- Since:
- 1.0.63
- Default Value:
- false
- Source:
Methods
-
_onContainerKeydown(evt)
-
Extends the function mixed in from the dijit/_KeyNavContainer module to perform no action when suppressKeyNavigation is set to true.
Parameters:
Name Type Description evt
object The keyboard event - Since:
- 1.0.63
- Source:
-
_onContainerKeypress(evt)
-
Extends the function mixed in from the dijit/_KeyNavContainer module to perform no action when suppressKeyNavigation is set to true.
Parameters:
Name Type Description evt
object The keyboard event - Since:
- 1.0.63
- Source:
-
onKeyPress(evt)
-
Checks for the CTRL-e combination and when detected moves into edit mode.
Parameters:
Name Type Description evt
object The keypress event -
onSuppressKeyNavigation(evt)
-
Updates the suppressKeyNavigation with the emitted event details
Parameters:
Name Type Description evt
object The emitted event. - Since:
- 1.0.63
- Source:
-
onValueEntryKeyPress(e)
-
This function is connected via the widget template. It occurs whenever a key is pressed whilst focus is on the input field for updating the property value. All keypress events other than the enter and escape key are ignored. Enter will save the data, escape will cancel editing
Parameters:
Name Type Description e
object The key press event -
suppressContainerKeyboardNavigation(suppress, node)
-
Emits a custom event to notify any containers that use keyboard navigation that handling keyboard events needs to be suppressed whilst editing is taking place. If the argument is passed as false then it emits a custom event that indicates to containers that keyboard navigation can resume.
Parameters:
Name Type Argument Description suppress
boolean Whether or not to suppress keyboard navigation node
element <optional>
The node to suppress navigation from. -
suppressFocusRequest(evt)
-
A common use of this widget is to be placed inside a _MultiItemRendererMixin that listens for click events on any of the DOM elements inside each row so that it can focus on the correct item when clicked on. Therefore it is necessary to prevent focus being "stolen" whilst clicking on the edit control so this function handles click events and prevents them from bubbling any further out through the DOM.
Parameters:
Name Type Description evt
object The click event