Closed DiegoCardoso closed 1 week ago
Not sure what is happening in the video. Could you please clarify it?
This is what is happening in the video:
editable
modemove-mode
(hits Enter twice)editable
mode is disabled in the dashboard (for instance, in one listener for the dashboard-item-moved
event, a call to dasboard.editable = false
is done)After these few steps, you can see that the widget remains in the move-mode
although the dashboard as a whole is not editable anymore. Also, note that I can still move the widget around in this scenario.
Something I just noticed is that if on step (2) I only focus, hit Enter and use the arrow keys to move, then the focus ring is stuck and I can't move the focus with Tab and the console shows the following error:
focus-trap-controller.js:150 Uncaught TypeError: Cannot read properties of undefined (reading 'focus')
at FocusTrapController.__focusNextElement (focus-trap-controller.js:150:13)
at FocusTrapController.__onKeyDown (focus-trap-controller.js:129:12)
Description
If the
editable
attribute is changed while some widget is focused, you can end up in an unexpected state where the widget remains focused/editable:https://github.com/user-attachments/assets/d8c1a322-56e1-4124-a9a9-ce9dc7888578
Expected outcome
I would expect that after that the
editable
attribute is removed, that the widgets wouldn't be allowed to move/resize and theirfocused
state would be removed as well.Minimal reproducible example
Change the
dashboard-item-moved
event callback in thedev/dashboard.html
page to adddashboard.editable = false
Steps to reproduce
dev/dashboard.html
move
modeEnvironment
OS: N/A
Browsers
No response