-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get selected widgets during copy/cut after selecting all content #3352
Comments
@Comandeer I see it works fine on Chrome (tested on provided JSFiddle), but fails on Firefox, which means it is browser specific issue. Can you confirm? (Chrome - |
It's a little more complex - select all + copy works as expected on Chrome. But selecting widget then cutting it and then select all + copy returns empty widgets array 🤔 So on FF it simply fails for every copy while on Chrome it starts to fail after cutting widget 🤔 |
It's even more complex: it sometimes Just Works™ 😂 The behaviour seems to be totally random. |
OK, I discovered the pattern: selection is refreshed after releasing keys, so pressing Cmd/Ctrl+A and then immediately (without releasing Cmd/Ctrl key) Cmd/Ctrl+C/X shows 0 widgets. Also holding Cmd/Ctrl+A shows 0 until keys are released. It seems like more fundamental issue with refreshing selection in the editor/widget plugin. |
The very naive solution would be to fire Lines 934 to 940 in 5fa2a5b
However it seems to fix the issue only in Firefox, Chrome and Safari still incorrectly show the amount of selected widgets. I'm also not sure if such approach won't break anything inside the editor. For now I can think only of more dirty solution: force widget repository to check if widgets are selected also on |
Fixed in 6000049. |
Type of report
Bug
Provide detailed reproduction steps (if any)
Expected result
The array of two selected widgets should be logged into the console.
Actual result
An empty array is logged.
Other details
Strangely enough, adding
selectall
plugin seems to fix the issue 🤔The text was updated successfully, but these errors were encountered: