Back button doesn't work after you add a cover

Bug #528717 reported by George
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Library
Confirmed
Medium
Anand Chitipothu

Bug Description

After I add a new cover, the back button doesn't work. I can still see the history, and choose the previous page using that, but a simple "back" doesn't work.

Tags: covers
Revision history for this message
George (george-archive) wrote :

(It was a Work cover, for what it's worth.)

Changed in openlibrary:
assignee: nobody → Lance Arthur (lance-arthur)
importance: Undecided → Medium
status: New → Confirmed
milestone: none → upstream
Revision history for this message
Lance Arthur (lance-arthur) wrote :

I did some investigating and it turns out this is an iFrame-related problem. Loading the iFrame, which loads another page, advances the browser history. When the iFrame is "destroyed" the history isn't altered. There's a write-up here:

http://groups.google.com/group/colorbox/browse_thread/thread/de4da7c98ae6507d

The developer provided a solution for webkit (Safari, Chrome) but it doesn't work in Firefox. The other dev came up with a solution to hide the iFrame in a div and show it when called, but in our solution, due to the number of covers that could be called in, we aren't pre-calling the iFrame sources until the link is clicked.

I think the problem is that using history.length, Webkit starts at 0 while Firefox starts at 1. I'll try to massage the provided script to resolve our problem.

Revision history for this message
Lance Arthur (lance-arthur) wrote :

Some further investigation shows that the problem is not related to simply calling the iFrame, the problem only occurs if you take action within the iFrame and end up with the Success screen. In other words, if you just click on the link and open the pop-up and do nothing, and then close the pop-up, browser history is not effected. If you actually select a cover or manage covers and get the Success verification, history advances by 1 and if you attempt to arrow-back in the browser, you need to do so twice.

So... more futzing.

Revision history for this message
Lance Arthur (lance-arthur) wrote :

This is either A) unresolvable or B) a problem for Anand.

A) The browser is working correctly. When loading the success page, browser history is altered because a new page was rendered. Using the back button would normally page-back within the iframe first, but the iframe is closed so the history is forced to "catch up" to the window content.

B) Found a solution proposed online: Use an Ajax Post in the form. That won't affect browser history because Ajax calls aren't stored. But I can't code that up, and I'm not sure it'll work in this case.

Revision history for this message
Lance Arthur (lance-arthur) wrote :

I cannot proceed further with this bug.

George (george-archive)
Changed in openlibrary:
assignee: Lance Arthur (lance-arthur) → Anand Chitipothu (anandology)
tags: added: covers
Revision history for this message
Anand Chitipothu (anandology) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.