New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 708873 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

File opened with browser is not visible when session restore on startup is enabled

Reported by eugene...@yandex-team.ru, Apr 6 2017

Issue description

Chrome Version       : 56.0.2924.87
OS Version: OS X 10.12.3
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5: OK, file opens in new tab next to restored session
  Firefox 4.x: OK, file opens in new tab next to restored session
     IE 7/8/9:

What steps will reproduce the problem?
1. Launch Chromium
2. Set On statup option to "continue where you left" (restore session on startup)
3. Open some URL, for example, google.com
4. Close Chromium.
5. Find some html, for example, file.html in Finder, right-ckick it and choose "open with"-> Chromium

What is the expected result?
Session is restored (there is no reason to break this behavior) and file is opened too and it is visible for user that file was opened.
Opening file in a new tab in the same browser window where session was restored looks like reasonable solution.

What happens instead of that?
Chromium is launched with 2 windows, a window with restored session (google.com) on top and a window with opened file (file.html) behind it, so it is not visible for user that file was actually open when he intended to do this.

 
Labels: Needs-Milestone

Comment 2 by a...@chromium.org, Apr 6 2017

Is this Mac-only, or does it happen on other platforms?

Comment 3 by a...@chromium.org, Apr 7 2017

Cc: sail@chromium.org thakis@chromium.org rsesek@chromium.org mark@chromium.org
 Issue 246096  has been merged into this issue.
Yes, this is Mac-only bug. Happens due to mac-specific startup URL handling.
On Windows, Chrome works like Firefox and Safari on Mac - URL opens in the new tab next to the restored session.
Cc: kkaluri@chromium.org
Labels: Needs-Feedback
Unable to reproduce this issue on Mac 10.12.4 with chromium #56.0.2924.0 , #59.0.3068.0

Tested the scenario as per steps mentioned in the comment #0, observed that chromium has launched single session along with index.html along with previous tabs.

Attaching the screen-cast for reference

eugenebng@ could you please look into it and let us know your observations.
Issue 708873.mp4
2.7 MB View Download
Sorry, my repro steps were not exact. When you close Chromium window (step 4), then you see HTML file being opened as tab (exactly as in attached screencast).

The correct repro step 4 is not
"Close Chromium"
but
"Quit Chromium (Cmd+Q)". 
Then this bug reproduces. I've checked that in a fresh build, Version 59.0.3068.0 (Developer Build) (64-bit) just to be shure.


BTW, in screencast attached you can see the evidence of different startup URL handling on Mac - when browser window was closed, that HTML file opens in a first tab rather then last tab. Unlike Chrome on Windows, where file being opened is opened in a last tab rather then first.
Project Member

Comment 7 by sheriffbot@chromium.org, Apr 11 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: jmukthavaram@chromium.org
Components: UI>Browser>Sessions
Labels: -Needs-Milestone M-60
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.12.4 using chrome stable version -58.0.3029.81 & Canary-60.0.3079.0 as per steps mentioned comment#0 & comment#6.

Observed that the Chromium is launched with 2 windows, a window with restored session (wikipedia.com) on top and a window with opened file (file.html)is behind it, so it is not visible for user that file was actually open when he intended to do this.

Same behavior seen on M40 also.Hence marking it as 'Untriaged' to get more inputs from dev.

Please find the attached screencast for reference.
Thank you..!
708873.mp4
4.3 MB View Download

Comment 9 by shrike@chromium.org, Apr 28 2017

Labels: Hotlist-PlatformExcellence
Status: Available (was: Untriaged)
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463

commit 7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463
Author: eugenebng <eugenebng@yandex-team.ru>
Date: Thu Jun 15 13:38:47 2017

Fix for tab opening code

When URL is opened from other program or local file system and session restored at the same time, opened URL is shown in a window behind restore session and not really visible to user.

This fixes opening URL for cases:
1. When Chromium is not started yet.
2. When Chromium is started, has window(s).
3. When chromium app is started, but has no windows.

for different startup settings:
1. Default startup.
2. Restore session on startup.
3. Open pre-defined set of URLs on startup.

R=sky@chromium.org,gab@chromium.org,avi@chromium.org

BUG=708873

Review-Url: https://codereview.chromium.org/2798143004
Cr-Commit-Position: refs/heads/master@{#479684}

[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/app_controller_mac.mm
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/app_controller_mac_browsertest.mm
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/lifetime/browser_close_manager_browsertest.cc
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/sessions/session_restore.cc
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/sessions/session_restore.h
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/chrome/browser/sessions/session_restore_browsertest.cc
[add] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/content/public/test/repeated_notification_observer.cc
[add] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/content/public/test/repeated_notification_observer.h
[modify] https://crrev.com/7afbc36eeee75f34c8ad3aa2f90cb6fc1f345463/content/test/BUILD.gn

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f106b584b528fc2d2e84660da8c9ae99eb4178a

commit 1f106b584b528fc2d2e84660da8c9ae99eb4178a
Author: Scott Violet <sky@chromium.org>
Date: Wed Jul 12 15:49:58 2017

Revert: Fix for URL opening code

Reverting as has caused a couple of regressions. Latest is opening
links from external applications doesn't work.

BUG=708873, 739200 
TEST=verify 739200 is fixed, 708873 will be broke again

Change-Id: I5275694888bcead75deb44450e7e6e1192c17adf
Reviewed-on: https://chromium-review.googlesource.com/567562
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485974}
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/app_controller_mac.mm
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/app_controller_mac_browsertest.mm
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/lifetime/browser_close_manager_browsertest.cc
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/sessions/session_restore.cc
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/sessions/session_restore.h
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/chrome/browser/sessions/session_restore_browsertest.cc
[delete] https://crrev.com/b789d5d5b73cdf5d7afd99eaa19dac801811d296/content/public/test/repeated_notification_observer.cc
[delete] https://crrev.com/b789d5d5b73cdf5d7afd99eaa19dac801811d296/content/public/test/repeated_notification_observer.h
[modify] https://crrev.com/1f106b584b528fc2d2e84660da8c9ae99eb4178a/content/test/BUILD.gn

Project Member

Comment 12 by sheriffbot@chromium.org, Jul 12

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -M-60 Target-71 M-71
Owner: lgrey@chromium.org
Status: Assigned (was: Untriaged)
mac triage: to lgrey@ for M71.
Labels: -Hotlist-Recharge-Cold

Sign in to add a comment