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

Flicker on load #425

Closed
OlympicLarry opened this issue Jan 22, 2015 · 6 comments
Closed

Flicker on load #425

OlympicLarry opened this issue Jan 22, 2015 · 6 comments
Assignees
Milestone

Comments

@OlympicLarry
Copy link

Is there a way to eliminate the flicker on load?

press F5 on the following page http://www.bootstrap-switch.org/examples.html

@Panman82
Copy link

No, it's the short time before javascript is loaded (before bootstrap-switch has time to load). The native HTML behind it is a checkbox or radio, so that's what you'll see at first. That "flicker" will differ for each system and network, but should be minimal.

@LostCrew
Copy link
Member

@Panman8201 i think he refers to the internal delay of execution of init logic, which is indeed perceivable. i'll try to reduce that.

@LostCrew LostCrew self-assigned this Jan 23, 2015
@OlympicLarry
Copy link
Author

Yes, you are correct @LostCrew. When the switch inits, I believe the widths and margin-left values are not correct so we see a flash of the wrong switch value.

@Panman82
Copy link

Interesting, I think I see what you're talking about using Internet Explorer. (When both on/off labels show up??) Chrome has a slight "flash" of the checkbox before the switch loads. But Firefox has no flicker, shows the switch immediately, looks nice.

@LostCrew LostCrew added this to the 3.3.2 milestone Jan 25, 2015
@LostCrew
Copy link
Member

fix in develop, coming out in 3.3.2.

@bytebodger
Copy link

I know this is a bit hack-ish, but I put style="opacity:0;" on the input checkbox element. This makes it disappear without removing it from the DOM (so it still receives events and such). And as long as the Bootstrap Switch is in place, you don't ever want the user to SEE the original checkbox anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants