Skip to content
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

Do not remove focused element from the DOM #5493

Closed
oskarwrobel opened this issue Feb 14, 2019 · 4 comments
Closed

Do not remove focused element from the DOM #5493

oskarwrobel opened this issue Feb 14, 2019 · 4 comments
Labels
package:ui resolution:expired This issue was closed due to lack of feedback. status:stale

Comments

@oskarwrobel
Copy link
Contributor

In some browsers (Firefox, Edge, Safari) the active (focused) element does not fire blur event when is removed from the DOM. It might cause some issues related to the FocusTracker https://github.com/ckeditor/ckeditor5-link/issues/193 or even more freaky issues like autocomplete attached to the void #1501. I'm sure we have similar issues with the image balloons.

It should be a good practice to move the focus from the element before removing it. However, it is easy to forget about it and it is not easy to track the related bugs. We decided to log a warning when a focused element has been removed from the DOM.

@oskarwrobel
Copy link
Contributor Author

I wanted to do it now but there are some tricky cases like where to put the focus before removing LinkFormView from the balloon. Putting focus to the editable makes balloon flickering.

@Reinmar
Copy link
Member

Reinmar commented Mar 25, 2019

Couldn't FocusTracker automatically blur an element when it got removed from the DOM? It could use a mutation observer or something to track such changes.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the backlog milestone Oct 9, 2019
@pomek pomek removed this from the backlog milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

@CKEditorBot CKEditorBot added the resolution:expired This issue was closed due to lack of feedback. label Nov 4, 2023
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui resolution:expired This issue was closed due to lack of feedback. status:stale
Projects
None yet
Development

No branches or pull requests

5 participants