URLs typed in a newly opened tab will sometimes open in an old one

Number:rdar://29814605 Date Originated:27-Dec-2016
Status:Duplicate of 29458719 (Open) Resolved:
Product:Safari Product Version:
Classification: Reproducible:
Recently (I _think_ since around 10.12.2) Safari has started having a weird race condition: sometimes, when opening a new tab and typing an URL to open, then hitting enter and switching back to a different tab before the URL finishes loading, the typed in URL will open in the old tab, instead of the newly opened one.

It seems to happen more often if the URL is autocompleted and not fully typed by hand.

Unfortunately, I couldn't find a 100% reproducible test case :(

Steps to Reproduce:
1. Have multiple tabs opened in Safari.
2. Press cmd-t to open a new one.
3. Start typing an URL.
4. Hit enter when you've typed enough of the URL for it to autocomplete to the desired one
5. Switch back to one of the previous tabs

Expected Results:
One can continue using all of the old tabs as they were and the new tab loads content in the background.

Actual Results:
Sometimes, the newly typed URL will open in currently visible tab, losing the "back" history, making recovering from such errors infuriating.

Safari Version 10.0.2 (12602.
macOS 10.12.2 (16C67)


Response from Apple on 03 Jan 2017

Apple Developer Relations03-Jan-2017 08:08 PM

Please provide sysdiagnose output from the affected system(s). Please collect this either while the issue is occurring, or as soon after as possible (for example, take it after a reboot if necessary).

Please let us know what you were doing that caused the issue, so we can correlate your actions with the diagnostic output in sysdiagnose. Please try to focus on one or two actions that cause an issue. If you perform many different actions, it will be difficult for us to determine which action caused the sysdiagnose output.

Note the date and time of the failure also, please.

sysdiagnose Instructions: https://developer.apple.com/services-account/download?path=/OS_X/OS_X_Logs/sysdiagnose_Logging_Instructions.pdf

For a complete list of logging instructions visit: https://developer.apple.com/bug-reporting/profiles-and-logs/

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!