Closed (won't fix)
Project:
Bootstrap
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Sep 2014 at 15:16 UTC
Updated:
7 Apr 2015 at 09:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
heacu commentedComment #2
Konstantin Komelin commentedHi @brtamas,
Thank you for your patch.
I met the same problem with Advanced Forum and "Reply with quote" functionality.
Here is my case:
I have a node (node/33495) with a list of comments where "Reply with quote" links look like:
/comment/reply/33495/192200?quote=1#comment-form
This node page itself has a comment form and id="comment-form" accordingly.
The bootstrapAnchor behavior ignores the difference in urls and move my focus to the comment form instead of redirecting to the necessary comment page.
So it's definitely a bug and it should be fixed.
However, your patch doesn't work in my case because even if this.validAnchor is equal to FALSE the following code doesn't return.
That's because it depends on the second condition which is not TRUE.
I do have id="comment-form" on the page so !$target.length is FALSE.
Thanks,
Konstantin
Comment #3
brtamas commentedI attach another page with other fixes.
And for replay:
Hi Konstantin,
Do you use bootstrap 3.0? Because as I see in this version's js the condition is formulated this way:
if (this.validAnchor && $target.length && offset > 0) {
// DO THE SCROLLING, PREVENT DEFAULT...
}
So it is the positiv way, I mean, if everything is all right to scroll to the page's another position, it does it (and prevent the default clicking).
Comment #4
Konstantin Komelin commentedHi @brtamas,
Sure, my comment was targeted to Bootstrap 3. However, it might have been changed since my comment (3 months ago).
-- Konstantin
Comment #5
markhalliwellComment #6
markhalliwellClosing in favor of #2462645: Create @BootstrapPlugin for "bootstrap-anchor".
Marking as "won't fix", because any solution(s) provided here is against the current code. This will be replaced with http://markcarver.github.io/bootstrap-anchor/ instead.