New issue
Advanced search Search tips

Issue 751819 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Regression

Blocked on:
issue 622940



Sign in to add a comment

Web Bluetooth chooser in a chrome app doesn't pair, cancel, or dismiss

Project Member Reported by scheib@chromium.org, Aug 2 2017

Issue description

1. Load a chrome app (e.g. attached one, with --load-and-launch-app)
2. The window must be smaller than the Web Bluetooth chooser.
   (the default size of the attached app is)
2. call navigator.bluetooth.requestDevice
3. See the chooser, select a device

Expected:

Pressing 'pair' or 'cancel' or clicking off the chooser should dismiss it.

Actual:

Clicking on the buttons causes the chrome app window to move to the background. The chooser does not ever close unless the chrome app window is closed.

---

Work Around

Increase the size of the Chrome App window to be larger than the device chooser UI that pops up.

---

Next Steps: 
- This may have always been this way. First confirm if the bug exists at
  revision 435075, Nov 29 (Chrome 56?)
- tools/bisect-builds shows bad builds back to 471627, Sun May 14
- First, verify build 435075 is OK.
- If necessary, git bisect between 435075 - 471627
 
hello-world-web-bluetooth-app.zip
586 KB Download
Cc: juncai@chromium.org
Components: Blink>Bluetooth
ChromeOS builds back to at least 471627 == Sun May 14 are affected.
Description: Show this description
Labels: OS-Chrome
ChromeOS affected, but not macOS.
Description: Show this description
After some investigation, we found that in the "hello-world-web-bluetooth-app.zip" example, the window size of the app is very small. And the workaround is to drag the corner of the app window and make it larger, and then the chooser will work as expected.

We will continue to investigate more what causes it.
Description: Show this description
Cc: -juncai@chromium.org
Owner: juncai@chromium.org

Comment 8 by scheib@chromium.org, Aug 16 2017

related, possible duplicate of,  issue 730891 .
Note that I can't reproduce in Chrome OS:

Google Chrome	62.0.3176.0 (Official Build) canary (64-bit)
Revision	0
Platform	9840.0.0 (Official Build) canary-channel samus
Firmware Version	Google_Samus.6300.174.0


Screenshot 2017-08-17 at 2.51.00 PM.png
163 KB View Download
I think if you adjust the chrome apps window size and make it smaller you may reproduce this in ChromeOS.
Even with a window of 100x100, I still can't reproduce. See screenshot attached.
Screenshot 2017-08-17 at 6.01.51 PM.png
58.3 KB View Download
hmm... If you click the Cancel, is the chooser closed? or nothing happens and the chrome app and chooser are still there?

I can reproduce it with the latest build of ChromeOS on Linux.

Oh you're right! I can reproduce with the mouse.
I was using keyboard tab to access "Pair" and "Cancel"
 Issue 730891  has been merged into this issue.
Cc: ellyjo...@chromium.org
Add ellyjones@ to the CC list.

ellyjones@: recently you also worked on: //chrome/browser/ui/views/extensions/chooser_dialog_view.cc
Any suggestion of what may cause this? Or do you know someone who works on views and may know what causes this? Thanks a lot!
Cc: tapted@chromium.org
Hm. I don't really know anything about Aura window management, I'm afraid - try tapted@? (cced)
Ah. Yeah - aura events in a non-top-level window are managed by the top-level window. If the top-level window is smaller than the child window, the events "miss" and are not sent.

Someone was trying to fix this in Issue 622940. E.g. it means we currently have to clip the print preview dialog on Linux and ChromeOS to the parent window, where really it should be able to extend outside it. There is some work in https://codereview.chromium.org/2172363002/ but it seems to have stalled.
Blockedon: 622940
issue 622940 shows that fixing the UI framework is a large task and unlikely to happen anytime soon.

Suggestion:
We address this issue by constraining the chooser window to be no larger than the underlying window. This will cause the chooser to not be usable, but in a way that users can understand (oh, the window isn't large enough) and work around. (instead of current behavior which is simply confusing, "why don't these buttons work?").
Cc: reillyg@chromium.org
Some update:

I am working on a CL that can limit the size of the chooser window to be no larger than the underlying window. I uploaded two screenshots here, one uses the "hello-world-web-bluetooth-app.zip" example above that was used to reproduce the issue; the other one uses the "USB Device Info" (https://chrome.google.com/webstore/detail/usb-device-info/igkmggljimacfdfalpeelenjeicmfnll) that was mentioned in  Issue 730891 . Both choosers are now smaller than the Chrome apps window and the buttons and links on the chooser can be clicked.
chooser_1.png
29.9 KB View Download
chooser_2.png
16.5 KB View Download
When the Chrome apps window size is very small, the chooser's titlebar and buttons are still visible.
chooser_3.png
6.9 KB View Download
Project Member

Comment 22 by bugdroid1@chromium.org, Sep 14 2017

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

commit 9172212c121af436c6a3e462643f0233e0a6f525
Author: Jun Cai <juncai@chromium.org>
Date: Thu Sep 14 20:10:46 2017

Make device chooser size not larger than underlying window on Chrome apps

When the size of the device chooser window is larger than the underlying
Chrome app's window, clicking the buttons on the chooser  causes the
Chrome app window to move to the background and the chooser doesn't close
unless the Chrome app window is closed. This CL modifies the chooser
related code to make the chooser size not larger than the underlying
Chrome app's window. By doing this, the buttons and links on the chooser
work properly.

I uploaded some chooser screenshots on the following issue page.

Bug:  751819 
Change-Id: I1c89c3ea986fb2e85bbda7d49874b803ae01ed5e
Reviewed-on: https://chromium-review.googlesource.com/664096
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502027}
[modify] https://crrev.com/9172212c121af436c6a3e462643f0233e0a6f525/chrome/browser/ui/views/device_chooser_content_view.cc
[modify] https://crrev.com/9172212c121af436c6a3e462643f0233e0a6f525/chrome/browser/ui/views/device_chooser_content_view.h

Status: Fixed (was: Started)

Comment 24 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 25 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment