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

Bug in dropdown view leads to wrong position of dropdown when no optimal position is found #17220

Closed
nilsfr opened this issue Oct 4, 2024 · 3 comments · Fixed by #17374
Closed
Assignees
Labels
domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. domain:ui/ux This issue reports a problem related to UI or UX. package:ui type:bug This issue reports a buggy (incorrect) behavior.

Comments

@nilsfr
Copy link

nilsfr commented Oct 4, 2024

The line with the error is the following:

optimalPanelPosition ? optimalPanelPosition.name : this._panelPositions[ 0 ].name

The problem here is that this.panelPositions[0] returns a callable. Here you get the name of the callable, not the name of the position.

The values returned by _panelPositions is defined i defaultPanelPositions.

@Witoso Witoso added package:ui domain:ui/ux This issue reports a problem related to UI or UX. domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. type:bug This issue reports a buggy (incorrect) behavior. labels Oct 14, 2024
@Witoso
Copy link
Member

Witoso commented Oct 14, 2024

Hi! Thanks for reporting, could you provide some screens that will help us to better understand the issue.

@nilsfr
Copy link
Author

nilsfr commented Oct 22, 2024

I tried to fix #17225 by setting viewportTopOffseton StickyPanelView to a high number to avoid the panel becoming sticky. The result of this was that optimalPanelPosition was not found and the fallback this._panelPositions[ 0 ].name was used. But as this fallback gave the name of the function southEast and not the name of the name of the position se the classname on the dropdown was wrong, leading to the wrong position of the dropdown.

I found another solution to this so I do not have a screenshot of this, but the code here is wrong as it give the name of the function and not the name of the position.

@Mati365 Mati365 self-assigned this Oct 31, 2024
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Nov 4, 2024
@Mati365
Copy link
Member

Mati365 commented Nov 4, 2024

I checked this and confirm, it returns the wrong value. This error makes the panels appear in the wrong position when the optimal position cannot be found. I suggested a fix.

Thanks for investigating, @nilsfr 🎉

@Mati365 Mati365 closed this as completed in 00e9a7f Nov 6, 2024
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Nov 6, 2024
@CKEditorBot CKEditorBot added this to the iteration 80 milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. domain:ui/ux This issue reports a problem related to UI or UX. package:ui type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants