New issue
Advanced search Search tips

Issue 788049 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Ampersand character elided in bookmarks menu

Project Member Reported by reillyg@chromium.org, Nov 23 2017

Issue description

Chrome Version: 63.0.3239.50
OS: Chrome OS

What steps will reproduce the problem?
(1) Create bookmark or bookmark folder containing the character '&' (for example, "D&D").
(2) Open bookmarks menu.

What is the expected result?
The names displayed in the bookmarks menu should contain the '&' character.

What happens instead?
The names are missing that particular character.

This may be a regression as  issue 257768  covered a similar issue and was marked verified. I've reproduced this on M-62 and M-63.
 
Components: Internals>Views
Labels: OS-Linux OS-Windows
Looking into this some more it looks like the mnemonic code in Views is causing these characters to be stripped because we pass either the gfx::Canvas::SHOW_PREFIX or gfx::Canvas::HIDE_PREFIX flags when rendering the MenuItemView's title. Given that we display the ampersand in other bookmark views I don't think we could argue that allowing users to configure mnemonics for their bookmarks is our intention.

I'm adding the Internals>Views component because I'm unsure if it is possible to disable mnemonics in a submenu or not.
Cc: sky@chromium.org
Labels: OS-Mac
Owner: a...@chromium.org
Status: Assigned (was: Untriaged)
Avi said he'd fix this because it might break macOS when it switches to MacViews.

Comment 4 by a...@chromium.org, Apr 19 2018

Cc: a...@chromium.org
Owner: ellyjo...@chromium.org
I said that the Mac team would fix this, and to toss it to me to find someone to take it.

Elly, who'd be best here?
Labels: M-68 Target-68
I'll handle this one - I've been working on menus a bunch lately anyway.
Status: Fixed (was: Assigned)
I fixed this a while ago when I made Mac menus not use mnemonics.
Status: Assigned (was: Fixed)
I can still reproduce this on Linux with Chrome 71.0.3551.3. The ampersand is renderer in the "Other Bookmarks" dropdown on the NTP but not in the three dots menu > Bookmarks > Other Bookmarks.
Labels: -Pri-3 -M-62 -M-68 -Target-68 Target-72 M-72 Pri-2
#7: Ah, thanks - I see the wrong behavior in the dots menu. Dang.
Related to  bug 896550 ?
Cc: lgrey@chromium.org ellyjo...@chromium.org sdy@chromium.org
 Issue 896550  has been merged into this issue.
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 22

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

commit f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Mon Oct 22 22:06:35 2018

bookmarks: show ampersands in bookmark titles in app menu

This change:
1) Moves and renames ui::EscapeWindowsStyleAccelerators to make it available on
   other platforms;
2) Has BookmarkMenuDelegate call that function if the bookmark menu is being
   shown in the app menu;
3) Has BackForwardMenuModel call that function instead of hand-rolling escaping

In MenuItemViews whose root MenuItemView has_mnemonics(), '&' is interpreted
as a mnemonic marker, which makes it necessary to escape them.

Bug:  896550 , 788049 
Change-Id: I83f6bc6f5b71efa1d7220d8d20afa7dd833771ba
Reviewed-on: https://chromium-review.googlesource.com/c/1287325
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601744}
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/chrome/browser/ui/toolbar/back_forward_menu_model.cc
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/ui/base/accelerators/menu_label_accelerator_util.cc
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/ui/base/accelerators/menu_label_accelerator_util.h
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/ui/base/accelerators/menu_label_accelerator_util_linux.cc
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/ui/base/accelerators/menu_label_accelerator_util_linux.h
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/ui/base/accelerators/menu_label_accelerator_util_linux_unittest.cc
[modify] https://crrev.com/f8b6b9dc2e636fdc5d3333c4dae832ff1a9baad6/ui/base/accelerators/menu_label_accelerator_util_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment