Closed
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Description
The tests in cursor_test.js
, in the Movement
suite, fail with traces like this:
‣
Error: No highlight SVG found corresponding to this connection.
at RenderedConnection.getFocusableElement (file:///usr/local/google/home/bhenning/opensource/blockly/build/src/core/rendered_connection.js:556:15)
at FocusManager.focusNode (file:///usr/local/google/home/bhenning/opensource/blockly/build/src/core/focus_manager.js:198:87)
at LineCursor.setCurNode (file:///usr/local/google/home/bhenning/opensource/blockly/build/src/core/keyboard_nav/line_cursor.js:475:31)
at Context.<anonymous> (cursor_test.js:129:19)
In most cases, the root cause is that the focus manager state is not correctly cleared during teardown between tests. The focus manager still holds a location and attempts to set passive focus on it, but fails because there is no corresponding svg element to update.
The issue can be resolved by adding a reset function in focus manager and using it during teardown:
export function resetFocusManager() { focusManager = null;
This implies an actual issue with focus manager cleanup that @BenHenning will investigate.
Reproduction steps
Stack trace
Screenshots
No response
Browsers
No response
Metadata
Metadata
Assignees
Type
Projects
Status
Done