Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 408481 System dialogs (e.g. 'Save As...') are not modal on Ubuntu
Starred by 5 users Project Member Reported by sergeygs@chromium.org, Aug 28 2014 Back to list
Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment
Version: 38
OS: Ubuntu

What steps will reproduce the problem?
1. Open any page.
2. Invoke the 'Save As...' dialog (Ctrl-S or via the main menu).
3. While the dialog is still open, try clicking around in the page and in the Chrome's chrome behind it.

What is the expected output? What do you see instead?

Problem #1, after step 2:
- Expected: The dialog should receive keyboard focus. Typing alphanumeric characters should start entering the file name; hitting ESC should exit the dialog.
- Instead: The dialog is not focused. Keyboard events go to the browser behind it instead.

Problem #2 after step 3:
- Expected: The dialog should be modal and block any interaction with the up until closed.
- Instead: The dialog doesn't block the UI: navigation works, all the buttons work, the menu works, etc.

This seems to be at least partially a platform problem: a few other apps exhibit similar behavior with some variations. However: one tested app (Meld) is apparently able to mitigate at least the Problem #1 - the dialog it opens to select a file immediately gets the keyboard focus, and even though the mouse still can control the rest of the app, the keyboard focus stays fixed at the dialog.

All the above applies to Chrome Apps, too: e.g. when an app requests a file or folder entry via chrome.fileSystem.chooseEntry API, which opens a system file picker.
 
Labels: -Cr-Platform-Apps-OSIntegration Cr-Internals-Views
Owner: e...@chromium.org
Status: Assigned
Comment 2 by e...@chromium.org, Jan 6 2015
Cc: e...@chromium.org
Owner: ----
Status: Available
Mass unassigning myself from linux bugs.
Comment 3 by joone....@gmail.com, Mar 27 2015
I've submitted a patch:
https://codereview.chromium.org/1045443002/
Comment 4 by sgud...@google.com, Jul 15 2015
Hi guys,
Has the patch that's been submitted addressed the issue of "[Linux / Chrome] Able to send mail while attach files browser dialog box is still in open state"?
Thanks!
Comment 5 Deleted
Comment 6 by joone....@intel.com, Jul 15 2015
This CL can fix the problem that we are able to send mails while attaching files:
https://codereview.chromium.org/1045443002/
Project Member Comment 7 by bugdroid1@chromium.org, Jul 15 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b440cbb929e62a238f97590d79bd78333adef7ce

commit b440cbb929e62a238f97590d79bd78333adef7ce
Author: joone.hur <joone.hur@intel.com>
Date: Wed Jul 15 17:01:55 2015

Make File-Picker modal on Linux

Chromium for Linux opens a Gtk file-picker for file browsing, but it is not
modal because there is no GtkWindow as parent of file-picker.

This patch allows the X11 host window to disable input event handling to make
a file-picker modal.

BUG= 408481 

Review URL: https://codereview.chromium.org/1045443002

Cr-Commit-Position: refs/heads/master@{#338870}

[modify] http://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
[modify] http://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] http://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
[modify] http://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce/ui/views/widget/desktop_aura/x11_desktop_handler.cc

Project Member Comment 8 by bugdroid1@chromium.org, Jul 16 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bae7a498705ae28e2d08567928df640a7d48fa37

commit bae7a498705ae28e2d08567928df640a7d48fa37
Author: juncai <juncai@chromium.org>
Date: Thu Jul 16 23:51:11 2015

Revert of Make File-Picker modal on Linux (patchset #8 id:140001 of https://codereview.chromium.org/1045443002/)

Reason for revert:
This patch causes DCHECK failure. Refer to:
https://code.google.com/p/chromium/issues/detail?id=510957

Original issue's description:
> Make File-Picker modal on Linux
>
> Chromium for Linux opens a Gtk file-picker for file browsing, but it is not
> modal because there is no GtkWindow as parent of file-picker.
>
> This patch allows the X11 host window to disable input event handling to make
> a file-picker modal.
>
> BUG= 408481 
>
> Committed: https://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce
> Cr-Commit-Position: refs/heads/master@{#338870}

BUG= 408481 ,510957

Review URL: https://codereview.chromium.org/1243503002

Cr-Commit-Position: refs/heads/master@{#339173}

[modify] http://crrev.com/bae7a498705ae28e2d08567928df640a7d48fa37/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
[modify] http://crrev.com/bae7a498705ae28e2d08567928df640a7d48fa37/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] http://crrev.com/bae7a498705ae28e2d08567928df640a7d48fa37/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
[modify] http://crrev.com/bae7a498705ae28e2d08567928df640a7d48fa37/ui/views/widget/desktop_aura/x11_desktop_handler.cc

Comment 9 by sgud...@google.com, Aug 19 2015
Hi Chrome folks,
Is this one going to get addressed? Gmail has b/21882598 reported for this.
Thanks!
Here is the updated CL: https://codereview.chromium.org/1233913009/
Can you ask the reviewers to review this CL?
 Issue 232292  has been merged into this issue.
Project Member Comment 12 by bugdroid1@chromium.org, Nov 21 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3bc35de4ff086027d50519c9fb40122f27eb82f4

commit 3bc35de4ff086027d50519c9fb40122f27eb82f4
Author: joone.hur <joone.hur@intel.com>
Date: Sat Nov 21 00:26:52 2015

Make File-Picker modal on Linux

Chromium for Linux opens a Gtk file-picker for file browsing, but it is not
modal because there is no GtkWindow as parent of file-picker.

This patch allows the X11 host window to disable input event handling to make
a file-picker modal

The original CL was reverted due to wrong DCHECK with modal_dialog_xid_:
https://codereview.chromium.org/1243503002

BUG= 408481 
TEST=BrowserSelectFileDialogTest, ModalTest

Review URL: https://codereview.chromium.org/1233913009

Cr-Commit-Position: refs/heads/master@{#360961}

[modify] http://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
[modify] http://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
[modify] http://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] http://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
[modify] http://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4/ui/views/widget/desktop_aura/x11_desktop_handler.cc

Comment 13 by sgud...@google.com, Dec 16 2015
Hi Chrome folks,
Will someone going to be able to work on this one again?
Thanks!
Sanda
Is there any other issue?
Project Member Comment 15 by bugdroid1@chromium.org, Jan 21 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bf45553ab62cc5c97ee24bcdfbba9a0526235ea

commit 0bf45553ab62cc5c97ee24bcdfbba9a0526235ea
Author: sadrul <sadrul@chromium.org>
Date: Thu Jan 21 02:19:11 2016

Revert of Make File-Picker modal on Linux (patchset #18 id:340001 of https://codereview.chromium.org/1233913009/ )

Reason for revert:
Breaks input events in some cases ( crbug.com/579408 )

Original issue's description:
> Make File-Picker modal on Linux
>
> Chromium for Linux opens a Gtk file-picker for file browsing, but it is not
> modal because there is no GtkWindow as parent of file-picker.
>
> This patch allows the X11 host window to disable input event handling to make
> a file-picker modal
>
> The original CL was reverted due to wrong DCHECK with modal_dialog_xid_:
> https://codereview.chromium.org/1243503002
>
> BUG= 408481 
> TEST=BrowserSelectFileDialogTest, ModalTest
>
> Committed: https://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4
> Cr-Commit-Position: refs/heads/master@{#360961}

TBR=erg@chromium.org,juncai@chromium.org,msw@chromium.org,sky@chromium.org,joone.hur@intel.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 408481 

Review URL: https://codereview.chromium.org/1594973009

Cr-Commit-Position: refs/heads/master@{#370570}

[modify] http://crrev.com/0bf45553ab62cc5c97ee24bcdfbba9a0526235ea/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
[modify] http://crrev.com/0bf45553ab62cc5c97ee24bcdfbba9a0526235ea/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
[modify] http://crrev.com/0bf45553ab62cc5c97ee24bcdfbba9a0526235ea/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] http://crrev.com/0bf45553ab62cc5c97ee24bcdfbba9a0526235ea/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
[modify] http://crrev.com/0bf45553ab62cc5c97ee24bcdfbba9a0526235ea/ui/views/widget/desktop_aura/x11_desktop_handler.cc

Project Member Comment 16 by bugdroid1@chromium.org, Jan 21 2016
Labels: merge-merged-2623
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d7015d8a6ceafecb85f79c4747be4f48470fdb6d

commit d7015d8a6ceafecb85f79c4747be4f48470fdb6d
Author: Sadrul Habib Chowdhury <sadrul@chromium.org>
Date: Thu Jan 21 05:35:56 2016

Revert of Make File-Picker modal on Linux (patchset #18 id:340001 of https://codereview.chromium.org/1233913009/ )

Reason for revert:
Breaks input events in some cases ( crbug.com/579408 )

Original issue's description:
> Make File-Picker modal on Linux
>
> Chromium for Linux opens a Gtk file-picker for file browsing, but it is not
> modal because there is no GtkWindow as parent of file-picker.
>
> This patch allows the X11 host window to disable input event handling to make
> a file-picker modal
>
> The original CL was reverted due to wrong DCHECK with modal_dialog_xid_:
> https://codereview.chromium.org/1243503002
>
> BUG= 408481 
> TEST=BrowserSelectFileDialogTest, ModalTest
>
> Committed: https://crrev.com/3bc35de4ff086027d50519c9fb40122f27eb82f4
> Cr-Commit-Position: refs/heads/master@{#360961}

TBR=erg@chromium.org,juncai@chromium.org,msw@chromium.org,sky@chromium.org,joone.hur@intel.com
BUG= 408481 ,  579408 

Review URL: https://codereview.chromium.org/1594973009

Cr-Commit-Position: refs/heads/master@{#370570}
(cherry picked from commit 0bf45553ab62cc5c97ee24bcdfbba9a0526235ea)

Review URL: https://codereview.chromium.org/1616703002 .

Cr-Commit-Position: refs/branch-heads/2623@{#36}
Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}

[modify] http://crrev.com/d7015d8a6ceafecb85f79c4747be4f48470fdb6d/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
[modify] http://crrev.com/d7015d8a6ceafecb85f79c4747be4f48470fdb6d/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
[modify] http://crrev.com/d7015d8a6ceafecb85f79c4747be4f48470fdb6d/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] http://crrev.com/d7015d8a6ceafecb85f79c4747be4f48470fdb6d/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
[modify] http://crrev.com/d7015d8a6ceafecb85f79c4747be4f48470fdb6d/ui/views/widget/desktop_aura/x11_desktop_handler.cc

Comment 17 by sgud...@google.com, Apr 11 2016
Labels: -merge-merged-2623 Merge-Merged-2623
Hi Chrome team,
Will someone be able to take a look at this one?
It is still causing an issue in Gmail with Chrome 49/50. Please see b/21882598 for more info.
Thanks!
I have a fix, but it is still under review.
https://codereview.chromium.org/1624793002/


Comment 19 by sgud...@google.com, Sep 21 2016
Hi Joone,
Were you able to make any progress on getting the fix reviewed?
Thanks!
Cc: thomasanderson@chromium.org
We need to ask the reviewer to give me feedback.
Project Member Comment 22 by bugdroid1@chromium.org, Oct 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df7f78e35f95dfae098dd6197b012e0506f68e0f

commit df7f78e35f95dfae098dd6197b012e0506f68e0f
Author: joone.hur <joone.hur@intel.com>
Date: Mon Oct 03 19:06:15 2016

Make File-Picker modal on Linux

Chromium for Linux uses GtkFileChooserDialog for opening a file-picker,
but it is not modal to the X11 host window because GtkFileChooserDialog
can be modal only to the parent GtkWindow.

This patch allows the X11 host window to disable input event handling
to make a file-picker modal.

Design doc and discussion:
https://docs.google.com/document/d/12CfKVTpaonxxM3sNksq6vY6qb0J2qR3b7h_bLxzYanE

This CL was reverted due to the UI freezing problem that happens when the
users open a file-picker from a child window of the X11 host window:
https://codereview.chromium.org/1594973009

BUG= 408481 , 579408 
TEST=BrowserSelectFileDialogTest.ModalTest

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

[modify] https://crrev.com/df7f78e35f95dfae098dd6197b012e0506f68e0f/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
[modify] https://crrev.com/df7f78e35f95dfae098dd6197b012e0506f68e0f/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
[modify] https://crrev.com/df7f78e35f95dfae098dd6197b012e0506f68e0f/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] https://crrev.com/df7f78e35f95dfae098dd6197b012e0506f68e0f/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Owner: joone....@intel.com
Status: Started
Status: Fixed
Sign in to add a comment