Ticket #7122 (closed bug: invalid)
Dynamic links aren't displayed as visited in IE 8 and IE 7
| Reported by: | liechtypo | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.5 |
| Component: | build | Version: | 1.5 |
| Keywords: | Internet Explorer, visited | Cc: | |
| Blocking: | Blocked by: |
Description
If you create dynamic links with jquery by creating dom anchor elements before hand and then set the attributes of those anchor elements later, the links don't work in IE 7 or 8. There are 2 cases here.
In the first case, I create a new variable for each row and append it to the table. In this case, in both IE 7 and 8, the links never show the visited state. If you click the link and click the back button on IE, they never display the visited state. Look at the jquery-each-bug.html example I have attached.
In the second case, I use the same variable for a row in the table and clone it after each iteration in the loop. In this case, IE 7 will display the link after the one I clicked as visited. Look at the jquery-each-bug-wrong-link.html example I attached.
Attachments
Change History
Changed 3 years ago by liechtypo
-
attachment
jquery-each-bug.html
added
Changed 3 years ago by liechtypo
-
attachment
jquery-each-bug-wrong-link.html
added
jquery-each-bug-wrong-link
comment:2 Changed 3 years ago by snover
- Status changed from new to closed
- Resolution set to worksforme
Thanks for the report, but this is not a jQuery bug. Also, I am unable to reproduce it. Please use the jQuery Forum in the future for support requests.
comment:4 Changed 3 years ago by liechtypo
- Status changed from closed to reopened
- Resolution worksforme deleted
Did you try my test cases that do show the bug? I can modify my test cases to create the anchors with the hrefs set in one line of code and the bug doesn't show up. I am seeing variations of this bug more often. I have to rearrange how I am doing the jquery code to fix this.
comment:5 Changed 3 years ago by snover
- Milestone changed from 1.4.3 to 1.4.5
Retargeting for next release.
comment:6 Changed 3 years ago by liechtypo
I created a jsfiddle of the jquery-each-bug-wrong-link.html example here:
comment:7 Changed 3 years ago by liechtypo
I created a jsfiddle of the jquery-each-bug.html
http://jsfiddle.net/wwwpol/qHrV6/
But that bug was fixed in 1.4.3. So the wrong link is still an issue in 1.4.3. The links don't get marked as visited in IE 7 and 8.
comment:9 Changed 3 years ago by snover
- Status changed from reopened to closed
- Resolution set to invalid
This is not a bug. Those web sites all perform 301 redirects to add www to the address; as such, they are never recorded as “visited” in IE.
comment:10 Changed 3 years ago by liechtypo
On your last comment. That is not the reason it doesn't show visited. And your last jsfiddle example doesn't demonstrate the 301 redirects. But I don't mind closing this bug because it was mostly fixed in 1.4.3. The second case is still a bug but you can work around it by not using clone.
comment:11 Changed 3 years ago by rwaldron
#7439 is a duplicate of this ticket.
comment:12 Changed 2 years ago by john
- Version changed from 1.4.2 to 1.5
There wasn't a 1.4.5 release, was actually 1.5.
comment:13 Changed 2 years ago by john
- Milestone changed from 1.4.5 to 1.5
There was no 1.4.5 release, was actually 1.5.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

jquery-each-bug