Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions core/block_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {BlockDragStrategy} from './dragging/block_drag_strategy.js';
import type {BlockMove} from './events/events_block_move.js';
import {EventType} from './events/type.js';
import * as eventUtils from './events/utils.js';
import type {Field} from './field.js';
import {FieldLabel} from './field_label.js';
import {IconType} from './icons/icon_types.js';
import {MutatorIcon} from './icons/mutator_icon.js';
Expand All @@ -46,8 +45,6 @@ import type {ICopyable} from './interfaces/i_copyable.js';
import type {IDragStrategy, IDraggable} from './interfaces/i_draggable.js';
import {IIcon} from './interfaces/i_icon.js';
import * as internalConstants from './internal_constants.js';
import {ASTNode} from './keyboard_nav/ast_node.js';
import {TabNavigateCursor} from './keyboard_nav/tab_navigate_cursor.js';
import {MarkerManager} from './marker_manager.js';
import {Msg} from './msg.js';
import * as renderManagement from './render_management.js';
Expand Down Expand Up @@ -550,35 +547,6 @@ export class BlockSvg
input.appendField(new FieldLabel(text), collapsedFieldName);
}

/**
* Open the next (or previous) FieldTextInput.
*
* @param start Current field.
* @param forward If true go forward, otherwise backward.
*/
tab(start: Field, forward: boolean) {
const tabCursor = new TabNavigateCursor();
tabCursor.setCurNode(ASTNode.createFieldNode(start)!);
const currentNode = tabCursor.getCurNode();

if (forward) {
tabCursor.next();
} else {
tabCursor.prev();
}

const nextNode = tabCursor.getCurNode();
if (nextNode && nextNode !== currentNode) {
const nextField = nextNode.getLocation() as Field;
nextField.showEditor();

// Also move the cursor if we're in keyboard nav mode.
if (this.workspace.keyboardAccessibilityMode) {
this.workspace.getCursor()!.setCurNode(nextNode);
}
}
}

/**
* Handle a pointerdown on an SVG block.
*
Expand Down
4 changes: 0 additions & 4 deletions core/blockly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,8 @@ import {IVariableMap} from './interfaces/i_variable_map.js';
import {IVariableModel, IVariableState} from './interfaces/i_variable_model.js';
import * as internalConstants from './internal_constants.js';
import {ASTNode} from './keyboard_nav/ast_node.js';
import {BasicCursor} from './keyboard_nav/basic_cursor.js';
import {Cursor} from './keyboard_nav/cursor.js';
import {Marker} from './keyboard_nav/marker.js';
import {TabNavigateCursor} from './keyboard_nav/tab_navigate_cursor.js';
import type {LayerManager} from './layer_manager.js';
import * as layers from './layers.js';
import {MarkerManager} from './marker_manager.js';
Expand Down Expand Up @@ -432,7 +430,6 @@ Names.prototype.populateProcedures = function (
// Re-export submodules that no longer declareLegacyNamespace.
export {
ASTNode,
BasicCursor,
Block,
BlockSvg,
BlocklyOptions,
Expand Down Expand Up @@ -589,7 +586,6 @@ export {
ScrollbarPair,
SeparatorFlyoutInflater,
ShortcutRegistry,
TabNavigateCursor,
Theme,
ThemeManager,
Toolbox,
Expand Down
9 changes: 0 additions & 9 deletions core/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1331,15 +1331,6 @@ export abstract class Field<T = any>
return false;
}

/**
* Returns whether or not the field is tab navigable.
*
* @returns True if the field is tab navigable.
*/
isTabNavigable(): boolean {
return false;
}

/**
* Handles the given keyboard shortcut.
*
Expand Down
14 changes: 0 additions & 14 deletions core/field_input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,6 @@ export abstract class FieldInput<T extends InputTypes> extends Field<
);
WidgetDiv.hideIfOwner(this);
dropDownDiv.hideWithoutAnimation();
} else if (e.key === 'Tab') {
WidgetDiv.hideIfOwner(this);
dropDownDiv.hideWithoutAnimation();
(this.sourceBlock_ as BlockSvg).tab(this, !e.shiftKey);
e.preventDefault();
}
}

Expand Down Expand Up @@ -674,15 +669,6 @@ export abstract class FieldInput<T extends InputTypes> extends Field<
return true;
}

/**
* Returns whether or not the field is tab navigable.
*
* @returns True if the field is tab navigable.
*/
override isTabNavigable(): boolean {
return true;
}

/**
* Use the `getText_` developer hook to override the field's text
* representation. When we're currently editing, return the current HTML value
Expand Down
222 changes: 0 additions & 222 deletions core/keyboard_nav/basic_cursor.ts

This file was deleted.

45 changes: 0 additions & 45 deletions core/keyboard_nav/tab_navigate_cursor.ts

This file was deleted.

Loading