-
Notifications
You must be signed in to change notification settings - Fork 25
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
The drop-down not displaying correctly when rezising the page. #10
Comments
Can you give an example? There is an option (appendTo) to attach the select box to another element. It's possible that if you attach it to another element, it would lose it's position relative to the original select box. |
Hi, The issue append when I give a larger size of my window then I re-open the drop-down. But I will try what your said to me, maybe it will fix it. EDIT (11:47 a.m) : When I place an other appendTo like this $('.sparkbox-custom').sbCustomSelect({ I still get a huge left/top into the css. EDIT (12:06) : When I set the appendTo to the body everything works fine execpt when I run the form, the form lose like 1px top.. Might be css issues now. |
The fact is that I have two drop down using the same script. If I place an appendTo a div position into the page, the offset.top it took with the top position of my element. So the new top is really big! Same thing happen to the offset.left. I tried to place fixed values for top and left, but my second drop-down is taking the position of the first.. |
Setting top and left should be optional anyways. In most cases this could be solved with css only. It just makes sense if the appendTo setting is set. Maybe it should completly be removed and replaced by a callback function. Then the user would have the choice how to calculate the top and left values. @poliquinp try the css above with top:0px !important; left:0px !important; and without appendTo setting as workaround. EDIT: |
@poliquinp i just commited a bugfix that should solve the problem. The changeset can be found there: You can use the forked version, till the pull request is merged into the main repository. EDIT: |
When I resize the page, the sub-menu doesn't take the new "left" values.
Is it normal?
The text was updated successfully, but these errors were encountered: