New issue
Advanced search Search tips

Issue 812946 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Translate Bubble doesn't close when tab is unfocused

Project Member Reported by bettes@chromium.org, Feb 16 2018

Issue description

MacOS Canary 64.0.3282.167

What steps will reproduce the problem?
1. #enable-translate-new-ux
2. navigate to naver.com 
3. translate bubble appears
4. Open a new tab

What is the expected result?
Translate bubble should disappear once naver.com is unfocused

What happens instead?
Translate bubble remains once naver.com is unfocused


 
Feb-15-2018 17-59-55.gif
2.9 MB View Download

Comment 1 by bettes@chromium.org, Feb 16 2018

Labels: -Pri-2 Pri-1
This is more accurately a P1. 
Cc: pbos@chromium.org

Comment 3 by pbos@chromium.org, Feb 16 2018

Cc: ellyjo...@chromium.org tapted@chromium.org
On Windows this dialog goes away just by holding ctrl (for ctrl+t to open a new tab). If we click on the tab strip to open a new tab goes away from the mousedown (regardless of clicking new tab or just anywhere outside the widget).

How are you opening the new tab? Mouse or keyboard shortcut?

+tapted@, +ellyjones@ is there a broader set of issues with widgets not being dismissed on Mac here?

Comment 4 by bettes@chromium.org, Feb 16 2018

Keyboard shortcut in the example. It doesn't go away when holding ctrl (on Mac). 
You're correct, mouse down anywhere in the UI removes the UI. 

Comment 5 by pbos@chromium.org, Feb 16 2018

If you bring the dialog up yourself on Windows (click the translate icon for instance), then ctrl+t gets eaten by the dialog so the tabs don't open. Do you mean that the dialog doesn't go away when you click ctrl or do you mean ⌘? Tab opens with ⌘ on Mac right?

It might be that this dialog's WebContentsObserver (or somehow through a parent class) should implement some of:

  virtual void WasShown() {}
  virtual void WasHidden() {}

To hide the dialog when the web contents are hidden (maybe show it again when the tab comes back, I dunno?). I assume web contents are hidden == tab is not visible and that there's normally only one web contents instance showing per browser window.

Comment 6 by tapted@chromium.org, Feb 19 2018

I don't think we're shipping #enable-translate-new-ux on Mac in m66 -- plan is to keep using an infobar until we have fewer moving parts.

This fix is could be very similar to https://chromium-review.googlesource.com/c/chromium/src/+/848113

note the call to TranslateBubbleView::CloseCurrentBubble() in the nearby diff of browser_view.cc -- Mac isn't using browser_view.cc yet, so is missing this CloseCurrentBubble call.

But translate should not be coupled to browser_view.cc in this way. That CL decoupled the zoom bubble, but not the translate bubble.

I think we might be at a point where LocationBarBubbleDelegateView should just become a WebContentsObserver. It already takes a web_contents in its constructor. 

https://chromium-review.googlesource.com/c/chromium/src/+/862966 would benefit from this as well.
@c6: re "I don't think we're shipping #enable-translate-new-ux on Mac in m66." 
That's not what ellyjones told me when I last checked. Elly, can you comment? We've been operating under the assumption that we're switching to the bubble on Mac in 66.

Comment 8 by bettes@chromium.org, Feb 20 2018

Labels: OS-Mac
Re: c5
Sorry I mis-spoke. The dialog doesnt go away when I click ⌘. Creating a new tab on Mac consists of ⌘ + T. 


#6: what are the moving parts? My current plan (as per #7) is to work with the translate team to flip #enable-translate-new-ux on M66, although I think the translate team owns actually doing any necessary code/experiment changes. Is there a reason we should not do that?
Elly - when you say the Translate team, do you mean the Chrome Language team? This is all news to me. I was under the impression that the MacViews team was handling all of this, akin to how the Harmony changes to Translate UIs were all done by the Harmony team.  Perhaps it's best you and I, as well as Anthony, Chrome Language's new TL and only team member right now (as of today) should sync offline?
Yes, good idea - I've booked us a meeting.
Owner: anthonyvd@chromium.org
Status: Assigned (was: Untriaged)
Anthony - will the focus issue be addressed by the other changes you're making to the bubble on Mac?
Ah! Unfortunately no, I wasn't aware of this issue. I made the other changes and called it done for now, and 66 is already branched.

I can take a look at this later this week to see how much effort is required and whether a merge to 66 is realistic/needed. Sounds good?
Yep, thanks. Ironically this slipped in our convo with Elly since this is what precipitated the discussion in the first place. I was triaging bugs and noticed it this morning.

Comment 15 by pbos@chromium.org, Mar 6 2018

If the patch isn't too complicated I don't think a merge is unrealistic, we're still early past branch point and this is very user visible imo.
Labels: Needs-TestConfirmation
Status: Fixed (was: Assigned)
This no longer replicates - I believe a separate change fixed the behavior. Can someone from test verify?

Sign in to add a comment