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

[Offcanvas menu] Opposite fixed element bug in Chrome #449

Open
softzer0 opened this issue Mar 17, 2016 · 5 comments
Open

[Offcanvas menu] Opposite fixed element bug in Chrome #449

softzer0 opened this issue Mar 17, 2016 · 5 comments

Comments

@softzer0
Copy link

Here is an example of this bug (just open it in Chrome and click to show the offcanvas): https://jsfiddle.net/07cLvwd3/2

@softzer0 softzer0 changed the title Opposite fixed element bug in Chrome [Offcanvas menu] Opposite fixed element bug in Chrome Mar 17, 2016
@chouex
Copy link

chouex commented May 16, 2016

+1
menu should not modify position if the fixed element is not relate to menu

@jasny
Copy link
Owner

jasny commented Jun 8, 2016

If right isn't set, the offcanvas plugin sees it as right: 0 instead of right: auto.

As a workaround add

.bs-sidebar.affix {
    right: auto !important;
}

https://jsfiddle.net/07cLvwd3/3/

@Minstel
Copy link
Collaborator

Minstel commented Jan 12, 2017

@jasny Workaround is not working in supplyed fiddle, fixed block disappears.

@Minstel
Copy link
Collaborator

Minstel commented Jan 12, 2017

@MikiSoft @chouex
I'm not sure if it is a bug. If fixed content stays unmoved, but rest of the page moves, it will break visual page structure, and can look bad, depending on page. So if you really need to not move some fixed elements, you can use the following workaround:

  • add an element, that you need to keep not moved, to excludes: (e.g. add data-exclude=".bs-sidebar" to toggle menu button)
  • set left or right property of that fixed element to some numerical value (otherwise, although it is positioned relatively to viewport, it will move when body is moved to the left or right)

Example is in here:
https://jsfiddle.net/07cLvwd3/4/

@Minstel
Copy link
Collaborator

Minstel commented Jul 22, 2017

@jasny What should we do in here?

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