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

affix plugin does not work within a pulled/pushed column #16282

Merged
merged 1 commit into from
Apr 17, 2015
Merged

affix plugin does not work within a pulled/pushed column #16282

merged 1 commit into from
Apr 17, 2015

Conversation

JoshData
Copy link
Contributor

This documents the limitation discussed in #12126:

When using column reordering and using the affix-plugin on an element positioned with push, the affix plugin doesn't work correctly - the element affected by the affix plugin is positioned to the left even when the element is in a column positioned on the right.

Seems to affect Safari (tested in version 8) only.

That issue has (unfortunately) been closed, so this at least documents the behavior.

JoshData added a commit to if-then-fund/if.then.fund that referenced this pull request Apr 14, 2015
…ns in Safari, and the width isn't right anywhere

twbs/bootstrap#12126 / twbs/bootstrap#16282

Reverse the columns so there is no pushing/pulling. Set the width in Javascript, or else the nav extends into the other column.
@@ -8,6 +8,7 @@ <h2 id="affix-examples">Example</h2>

<h2 id="affix-usage">Usage</h2>
<p>Use the affix plugin via data attributes or manually with your own JavaScript. <strong class="text-danger">In both situations, you must provide CSS for the positioning and width of your affixed content.</strong></p>
<p>Note: Do not use the affix plugin on an element contained in a relatively positioned element, such as a pulled or pushed column, due to a <a href="https://github.com/twbs/bootstrap/issues/12126">bug in rendering in Safari</a>.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tweak phrasing: "Safari rendering bug"

This documents the limitation discussed in #12126:

> When using column reordering and using the affix-plugin on an element positioned with push, the affix plugin doesn't work correctly - the element affected by the affix plugin is positioned to the left even when the element is in a column positioned on the right.

Seems to affect Safari (tested in version 8) only.

That issue has (unfortunately) been closed, so this at least documents the behavior.
@JoshData
Copy link
Contributor Author

@cvrebert : Got it. I force-pushed to my branch to update the PR in place.

@cvrebert
Copy link
Collaborator

@mdo LGTY?

@cvrebert cvrebert added this to the v3.3.5 milestone Apr 14, 2015
@mdo
Copy link
Member

mdo commented Apr 17, 2015

Yeah, sounds good. Totally didn't remember it was only Safari.

cvrebert added a commit that referenced this pull request Apr 17, 2015
affix plugin does not work within a pulled/pushed column
@cvrebert cvrebert merged commit a955164 into twbs:master Apr 17, 2015
@JoshData JoshData deleted the patch-1 branch April 17, 2015 19:49
@JoshData
Copy link
Contributor Author

Thanks to both of you!

@mark47
Copy link

mark47 commented May 14, 2015

I just noticed that was happening on something I built. In addition to the more elaborate solutions posed in the main issue thread (that's now locked), just thought I'd share the very simple workaround I have to turn off affix in Safari. Much better to lose the affix functionality than to have unreadable, overlapping content.

/* Check if we are in safari */
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
        // Find affix to turn off by id, class, etc.
        $(".affix-class").removeAttr("data-spy");
        // Or just turn off any affix on page that is in a <div>
        $("div[data-spy]").removeAttr("data-spy");
}

JoshData added a commit to if-then-fund/if.then.fund that referenced this pull request Sep 4, 2015
…ns in Safari, and the width isn't right anywhere

twbs/bootstrap#12126 / twbs/bootstrap#16282

Reverse the columns so there is no pushing/pulling. Set the width in Javascript, or else the nav extends into the other column.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants