Skip to main content

Class: CommentEditorNavigationPolicy

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:16

Set of rules controlling keyboard navigation from a comment editor. This is a no-op placeholder (other than isNavigable/isApplicable) since comment editors handle their own navigation when editing ends.

Implements​

Methods index​

MethodDescription
getFirstChildReturns the first child element of the given element, if any.
getParentReturns the parent element of the given element, if any.
getNextSiblingReturns the peer element following the given element, if any.
getPreviousSiblingReturns the peer element preceding the given element, if any.
getRowIdReturns the row ID of the given comment editor.
isNavigableReturns whether or not the given comment editor can be navigated to.
isApplicableReturns whether the given object can be navigated from by this policy.

Constructors​

Constructor​

new CommentEditorNavigationPolicy(): CommentEditorNavigationPolicy;

Returns​

CommentEditorNavigationPolicy

Methods​

getFirstChild()​

getFirstChild(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:17

Returns the first child element of the given element, if any.

Parameters​

ParameterTypeDescription
_currentCommentEditorThe element which the user is navigating into.

Returns​

IFocusableNode | null

The current element's first child, or null if it has none.

Implementation of​

INavigationPolicy.getFirstChild


getParent()​

getParent(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:21

Returns the parent element of the given element, if any.

Parameters​

ParameterTypeDescription
_currentCommentEditorThe element which the user is navigating out of.

Returns​

IFocusableNode | null

The parent element of the current element, or null if it has none.

Implementation of​

INavigationPolicy.getParent


getNextSibling()​

getNextSibling(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:25

Returns the peer element following the given element, if any.

Parameters​

ParameterTypeDescription
_currentCommentEditorThe element which the user is navigating past.

Returns​

IFocusableNode | null

The next peer element of the current element, or null if there is none.

Implementation of​

INavigationPolicy.getNextSibling


getPreviousSibling()​

getPreviousSibling(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:29

Returns the peer element preceding the given element, if any.

Parameters​

ParameterTypeDescription
_currentCommentEditorThe element which the user is navigating past.

Returns​

IFocusableNode | null

The previous peer element of the current element, or null if there is none.

Implementation of​

INavigationPolicy.getPreviousSibling


getRowId()​

getRowId(current): string;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:39

Returns the row ID of the given comment editor.

Parameters​

ParameterTypeDescription
currentCommentEditorThe comment editor to retrieve the row ID of.

Returns​

string

The row ID of the given comment editor.

Implementation of​

INavigationPolicy.getRowId


isNavigable()​

isNavigable(current): boolean;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:49

Returns whether or not the given comment editor can be navigated to.

Parameters​

ParameterTypeDescription
currentCommentEditorThe instance to check for navigability.

Returns​

boolean

False.

Implementation of​

INavigationPolicy.isNavigable


isApplicable()​

isApplicable(current): current is CommentEditor;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/comment_editor_navigation_policy.ts:59

Returns whether the given object can be navigated from by this policy.

Parameters​

ParameterTypeDescription
currentanyThe object to check if this policy applies to.

Returns​

current is CommentEditor

True if the object is a CommentEditor.

Implementation of​

INavigationPolicy.isApplicable