Make contextual balloon panel view skip empty targets #5510
Labels
package:ui
resolution:expired
This issue was closed due to lack of feedback.
status:stale
type:bug
This issue reports a buggy (incorrect) behavior.
I've been struggling with some errors on removing a panel from contextual balloon.
The issue is that when a view is removed from the balloon, the balloon uses old position to display new panel in the same placement as removed one. This works well if position target is static. When there's callback used the callback may operate on removed data - ie something that is not available in the view and doesn't have anything to point. It would be nice to return
null
orundefined
fromtarget()
callback so the balloon plugin would use new position to display such element. Right now it uses the last one: https://github.com/ckeditor/ckeditor5-ui/blob/b34e9d553d70997551310cee531f95b69f88de5b/src/panel/balloon/contextualballoon.js#L425while the view is removed from the stack later:
https://github.com/ckeditor/ckeditor5-ui/blob/b34e9d553d70997551310cee531f95b69f88de5b/src/panel/balloon/contextualballoon.js#L236-L247
Also the problem was that both panels were removed but the logic for updating balloon position was called for both removed panels.
The text was updated successfully, but these errors were encountered: