bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

[Offcanvas menu] Opposite fixed element bug in Chrome

Open softzer0 opened this issue 8 years ago • 5 comments

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

softzer0 avatar Mar 17 '16 19:03 softzer0

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

chouex avatar May 16 '16 04:05 chouex

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/

jasny avatar Jun 08 '16 18:06 jasny

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

Minstel avatar Jan 12 '17 07:01 Minstel

@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 avatar Jan 12 '17 12:01 Minstel

@jasny What should we do in here?

Minstel avatar Jul 22 '17 08:07 Minstel