Download & Extend

Clicking or linking to anchor tags don't work

Project:jQuery Update
Version:6.x-2.0-alpha1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I've come to this conclusion through the process of module elimination by disabling each 1 by 1. When linking to a page which appends an anchor tag to the url (ie: http://example.com/node#comments), the page will jump to the top of the page. This also happens when clicking on comment subject titles which also use the anchor tag to jump to specific points on the page.

I'm not too sure which part of this module is effecting this functionality but I noticed a couple of lines of code that supposedly are there to prevent this sort of issue (through reading the code comments). Line 236 in the tabledrag.js file (though this probably only effects table functions).

Comments

#1

I encountered this problem in 6.x-2.x-dev (2009-Apr-23).

Downgrading to 6.x-1.1 resolved the problem.

#2

what is jquery doing with an anchor tag?

#3

anyone out there who is able to explain this..

This line is called if I use an anchor:

reference to undefined property events[type][handler].data

Line 337

What means that?

My anchors are displayed in the bottom of the page, if I click an anchor, the page went to the top...

I can't go to vers. 1. cause of tabs panel style.

#4

when I was updating jquery from 1.2.6 to 1.3.2 I got the problem that my lightbox opens on an ancer tag (). currently was downgrading back to 1.2.6 and I will wait till a stable version is out of jquery 1.3.2 or higher for drupal 6.x

#5

Version:6.x-2.x-dev» 6.x-2.0-alpha1

I had this same problem with jQuery Update 6.x-2.0-alpha1. My users were unable to use the "New" links in the forum.
Downgrading to 6.x-1.1 resolved the problem.

This is a fairly serious bug, IMHO.

#6

i've been dealing with this bug for a while (http://drupal.org/node/934098) and can confirm it's a bug in 6.x-2.0-alpha1 ...

still a problem with 6x.2x as of April 19, 2011 - 19:14

will downgrade to 6.x-1.1 and see what other issues that causes ...

... i can confirm downgrading to 6.x-1.1 fixes the anchor link problem for nodes having attachments.

#7

boo ... downgrading to 6.x.1.1 breaks collapsiblock ... so i'm stuck at 6.x.2.0-alpha1

just to be clear the conflict is between jquery update and drupal core optional - load module (v. 6.19).

unenable either one of these modules and anchor links for articles with attachments will work again.

k

#8

See http://drupal.org/node/893538

Applying the patch in #8 seems to have fixed it for me.

#9

Thx for pointing this out Tanis.7x ... worked for me too.

oops ... i tested it on localhost and it worked, but it did not work on the hosted website ... it turns out localhost didn't have the problem to begin with (and it's an exact copy of the hosted site) ... weird ... more investigation is underway.

K

#10

I'm having the same issue. Any anchor links on the page (these were just created via TinyMCE/WYSIWYG) require two clicks to work. Disabling jquery_update fixes the issue, and downgrading to 1.1 also fixes it. Unfortunately colorbox requires 2.0, so that's a deal breaker. I'll try to figure out what's up with it...

Update: Fixed it by upgrading jQuery to 1.4.4. Not sure what the exact issue was, but I did have to install the previously mentioned patch to get tabledrag to work. Not sure if there will be other side effects, but this was a critical client issue, so I'm chancing it for now.

#11

i tried the patched tabledrag and the 1.4.4 jquery in both the /misc and the jquery_update/replace folders but no joy.

a question for stockliasteroid: does your anchor tag work when the destination folder has an attachment? If so, can you also tell me what version of jquery_update you used? I'm on 6.x-2.0-alpha1 ...

Thx

#12

Subscribe.

#13

subscribe

#14

Sorry, should have followed up... 1.4.4 ended up having too many other compatibility issues with jquery_update (tabledrag, etc, didn't work correctly anymore, even with latest jquery_update), so I ended up dumping it and going with jQuery.simpleScroll as a "solution". I'd rather not have to rely on a script-only solution, but that's all I had time for.

#15

Ran into the same issue, but I tracked it down to some incompatibility between jquery 1.3.2 and /misc/collapse.js. Disabling jquery_update or removing collapse.js (for debugging) fixes the issue, but neither is a real option. Also tried updating the module's js to the latest version of jquery, but that did not work either. Still looking for a viable solution.