-
Notifications
You must be signed in to change notification settings - Fork 7
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
DropDown: Pull down menu opens to the wrong side #189
Comments
Here the left/right position is determine for DetectBoundaries(true): Fit.UI/Controls/DropDown/DropDown.js Line 2494 in ade73e7
Here the right/right position is determined for DetectBoundaries(true, true) - relative to viewport: Fit.UI/Controls/DropDown/DropDown.js Line 2627 in ade73e7
|
This also seems less than optimal. If e.g. DropDownMaxWidth(100, "em") is configured, the calculated pixel width will be returned and become the basis of the calculation of space available - but the pull down menu might not even assume a width of 100em - remember, this is max-width, not actual width. It would be better if we could obtain offsetWidth from the pulldown menu instead. Fit.UI/Controls/DropDown/DropDown.js Line 2410 in ade73e7
|
Bonus bug found. If we use DetectBoundaries(true, true) without configuring DropDownMaxWidth(..), then the pull down menu exceeds the boundaries of the viewport: https://jsfiddle.net/7vhewxgq/ |
See https://jsfiddle.net/kvu2qcrm/6/
Try the 3 test cases in the JavaScript code. Notice how the combination of DropDownMaxWidth(600) + DetectBoundaries(true) causes the pull down menu to open to the left side, rather than to the right as expected.
Code from JSFiddle
HTML
CSS
JavaScript
The text was updated successfully, but these errors were encountered: