-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Sidebar] Changes directions if called twice #2644
Comments
Slight update. I realised that my code was slightly bugged in terms of the order in which the code was running. The |
If you use a different animation like |
I'm still seeing the issue, even specifying the transition in JS. http://jsfiddle.net/o4w62q58/1/ The first example is simply calling the sidebar initialiser twice. Both calls are explicitly specifying the transition effect, yet it is still being moved to the wrong side. The second example is what was actually happening in my code due to the script order, but nevertheless still highlight the issue. The first call is attaching the events, and the second call is initialising it, which is again moving it the wrong side even with the transition specified |
Might not be necessary, I'll need to review the git commit history for why |
I guess it's not really a major issue. My issue was resolved by just having the code execute in the correct order. And I guess people shouldn't be attempting to initialise it twice, but it is slightly unexpected behaviour. No major reason to change though. |
It seems safe to remove and will reduce user headaches. |
I'm having a strange issue with sidebars. My page has two sidebars, one on the left and one on the right. The structure of my code means the sidebar function is called twice, once to initialise it, and once to attach an event to a button that will make it visible when in a mobile view:
Fairly standard, and more or less how the documentation shows how to do it (without the first step though?)
My two sidebars are defined in the HTML as so (sorry, using HAML):
The primary sidebar is working as expected, however the secondary sidebar is behaving unusually. The initial
sidebar
call works fine, but when the second call to attach events is run, the sidebar moves and becomes a left sidebar.Semantic-UI
is changing the class fromright
toleft
without me requesting it.I've tried to replicate in a fiddle, and had partial success. I can't replicate it when my second call is to attach an event, it seems to work as expected, however if I ignore that and make two calls to the initialise itself, it is reproducing it.
https://jsfiddle.net/9hn5fw8w/1/
The second call to
dropdown
is commented out, and as you'll see it works correctly. But if you uncomment the second call, the sidebar is moved to the left of the screen.The text was updated successfully, but these errors were encountered: