Bug 15777 - Back/forward browser navigation causes tabs opened in a group to disappear/reappear
Summary: Back/forward browser navigation causes tabs opened in a group to disappear/re...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-10-31 11:25 PDT by Dylan
Modified: 2007-11-01 13:32 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dylan 2007-10-31 11:25:36 PDT
I'm a new face here, and I am not really sure if this is something I should report here, since it seems to be a bug with the Safari UI and not webkit... At any rate, here goes:

**Overview Description: 
When you click a folder of bookmarks that is set to automatically open in tabs in the bookmark bar, and then click the back button, all the tabs just opened are closed (and no warning is presented if you have the preferences set to warn before closing multiple tabs). Forward navigation is SOMETIMES not allowed in the nightlies (if you watch closely, as the other tabs are closing the forward button is black, but after they all close it gets grayed out), but always works works (AFAIK) in the Safari 3 beta (it re-opens all the tabs). 

Also note that in the nightlies and the beta, sometimes the Back item in the History menu is greyed out immediately after opening multiple tabs, and the hotkey command does not work, and sometimes it is not. I have not been able to figure out when the back item is active and when not, but it seems to have to do with whether any of the tabs just opened are still loading or not (though I could be wrong). I suspect the case for when the nightlies disallow forward navigation is similar to when it disallows back navigation. 
(Further testing makes it seem like, if the back item IS greyed out in the history menu, clicking the back BUTTON and then the forward button will re-enable it most of the time, which almost seems like a separate bug)

In both the nightlies and the beta, opening a single page in a new tab from a link (via cmd-click or the context menu) does NOT add anything to the current page's back/forward navigation history, so clicking back (or indeed forward) in the current page does not affect the other tab at all. This same behavior should probably be emulated when multiple tabs are opened at once. 

Also note that, in both the beta and nightlies, you can click back from ANY of the tabs opened, not just the first(active) one, whereas when opening a new tab normally (Cmd-Click a link), the new tab has no navigation history. It seems the entire navigational history is being propagated to all the tabs opened simultaneously. I am not sure whether the history is actually duplicated (which could use a lot of memory if you have a long history in this window!) or if all the pages are accessing the original page's history.

As a final note, if you open multiple tabs, then go to a new page in any of the tabs (link, bookmark, whatever), you cannot go back to 'before' you opened the tabs - it seems that this is only possible immediately after opening them.




**Steps to Reproduce:
 1) Ensure that you have a folder of bookmarks in your bookmarks bar set to auto-open in tabs. (Or a normal folder of bookmarks and Cmd-Click it to open them all in tabs)
 2) Open any web page (so you have somewhere to go back to!)
 3) Click the folder of bookmarks that auto-opens in tabs.
 4) Click "Back"
5) If you can, click "Forward"




**Actual Results:
All the tabs close, and no warning is shown if you have the preferences set to warn when closing multiple tabs. IF it lets you click forward, all the tabs are re-opened.





**Expected Results: 
The current page should step back in its history. Clicking forward should make the current page step forward through its history. All other tabs should be unchanged. In no cases should clicking back prevent you from subsequently clicking forward. 

Even if the closing of the tabs is intended in this case (which I doubt), it should warn you if you have the preferences set to warn you before closing multiple tabs, since that is what this does in effect. 







A slightly more extreme result (especially in the Beta) is if you already have multiple tabs open, to click another folder of bookmarks that auto-opens in tabs. Back/forward navigation now swaps the sets of tabs, though it doesn't appear that any are actually reloaded. (in the nightlies, forward navigation sometimes doesn't work...)


This is not specifically an error with the nightly builds, as it happens in the safari 3 beta as well. I don't think this is technically a webkit error since it deals with the UI, but it seems that a more careful use of the history stack in this case could solve the problem without having to alter the UI at all (normally, tabs don't have any back history to begin with so in most cases this is a non-issue, but when using folders of tabs they all get the original page and its history as their history, thus allowing you TO go back. If anything, only the currently active tab should get the navigation history of the current page (so all other tabs should be like a normal tab - no history), and a click back should only affect that tab).
Comment 1 David Kilzer (:ddkilzer) 2007-10-31 22:31:18 PDT
Confirmed with Safari 3 Public Beta v. 3.0.3 (522.12.1) with a local debug build of WebKit r27306 on Mac OS X 10.4.10 (8R218).

This is almost certainly an issue with Safari, not WebKit.
Comment 2 David Kilzer (:ddkilzer) 2007-10-31 22:31:39 PDT
<rdar://problem/5573050>
Comment 3 David Kilzer (:ddkilzer) 2007-10-31 22:36:52 PDT
Thanks for reporting this issue, Dylan!  Since this is now in Radar (Apple's internal issue tracking tool) and since it can't be fixed in WebKit, I'm going to close this bug as RESOLVED/INVALID.

In the future, if you have issues or enhancement/feature requests for Safari, please use <https://bugreport.apple.com/> to file them.  You may create a free "online" ADC account using <https://connect.apple.com/> if you're not currently an ADC member.

Please note that we transfer issues all the time from Bugzilla to Radar, so this isn't a big deal.  Please continue filing WebKit issues here.  Thanks!

Comment 4 David Kilzer (:ddkilzer) 2007-11-01 13:32:14 PDT
FWIW, this is actually the expected behavior (to open/close the tabs in a group when using the back/forward buttons)!