mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
refactor!: Use navigation rulesets instead of ASTNode to control keyboard navigation. (#8992)
* feat: Add interfaces for keyboard navigation. * feat: Add the Navigator. * feat: Make core types conform to INavigable. * feat: Require FlyoutItems elements to be INavigable. * feat: Add navigation policies for built-in types. * refactor: Convert Marker and LineCursor to operate on INavigables instead of ASTNodes. * chore: Delete dead code in ASTNode. * fix: Fix the tests. * chore: Assuage the linter. * fix: Fix advanced build/tests. * chore: Restore ASTNode tests. * refactor: Move isNavigable() validation into Navigator. * refactor: Exercise navigation instead of ASTNode. * chore: Rename astnode_test.js to navigation_test.js. * chore: Enable the navigation tests. * fix: Fix bug when retrieving the first child of an empty workspace.
This commit is contained in:
@@ -341,6 +341,18 @@ export class FieldNumber extends FieldInput<number> {
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this field's class.
|
||||
*
|
||||
* Used by keyboard navigation to look up the rules for navigating from this
|
||||
* field.
|
||||
*
|
||||
* @returns This field's class.
|
||||
*/
|
||||
getClass() {
|
||||
return FieldNumber;
|
||||
}
|
||||
}
|
||||
|
||||
fieldRegistry.register('field_number', FieldNumber);
|
||||
|
||||
Reference in New Issue
Block a user