Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dom.focus.tabbable.isTabbableIndex(element);
// $ExpectType Element | null
dom.getOffsetParent(node);
// $ExpectType DOMRect
dom.getRectangleFromRange(range);
// $ExpectType Element | undefined
dom.getScrollContainer(element);
// $ExpectType void
dom.insertAfter(node, node);
// $ExpectType boolean
dom.isEntirelySelected(element);
// $ExpectType boolean
dom.isHorizontalEdge(element, true);
// $ExpectType boolean
dom.isTextField(element);
// $ExpectType boolean
dom.isVerticalEdge(element, false);
// $ExpectType void
dom.placeCaretAtHorizontalEdge(element, true);
// $ExpectType void
dom.placeCaretAtHorizontalEdge(undefined, false);
// This logic inside this condition needs to be checked before
// the check for event.nativeEvent.defaultPrevented.
// The logic handles meta+a keypress and this event is default prevented
// by RichText.
if ( ! isNav ) {
// Set immediately before the meta+a combination can be pressed.
if ( isKeyboardEvent.primary( event ) ) {
this.isEntirelySelected = isEntirelySelected( target );
}
if ( isKeyboardEvent.primary( event, 'a' ) ) {
// When the target is contentEditable, selection will already
// have been set by the browser earlier in this call stack. We
// need check the previous result, otherwise all blocks will be
// selected right away.
if ( target.isContentEditable ? this.isEntirelySelected : isEntirelySelected( target ) ) {
onMultiSelect( first( blocks ), last( blocks ) );
event.preventDefault();
}
// After pressing primary + A we can assume isEntirelySelected is true.
// Calling right away isEntirelySelected after primary + A may still return false on some browsers.
this.isEntirelySelected = true;
}
return;
}
// Abort if navigation has already been handled (e.g. RichText inline
// boundaries).
if ( event.nativeEvent.defaultPrevented ) {
return;
// position (such as at an empty line), so it wouldn't be good to
// compute the position right before any vertical arrow key press.
if ( ! isVertical ) {
this.verticalRect = null;
} else if ( ! this.verticalRect ) {
this.verticalRect = computeCaretRect();
}
// This logic inside this condition needs to be checked before
// the check for event.nativeEvent.defaultPrevented.
// The logic handles meta+a keypress and this event is default prevented
// by RichText.
if ( ! isNav ) {
// Set immediately before the meta+a combination can be pressed.
if ( isKeyboardEvent.primary( event ) ) {
this.isEntirelySelected = isEntirelySelected( target );
}
if ( isKeyboardEvent.primary( event, 'a' ) ) {
// When the target is contentEditable, selection will already
// have been set by the browser earlier in this call stack. We
// need check the previous result, otherwise all blocks will be
// selected right away.
if ( target.isContentEditable ? this.isEntirelySelected : isEntirelySelected( target ) ) {
onMultiSelect( first( blocks ), last( blocks ) );
event.preventDefault();
}
// After pressing primary + A we can assume isEntirelySelected is true.
// Calling right away isEntirelySelected after primary + A may still return false on some browsers.
this.isEntirelySelected = true;
}