Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Issue 2951703002: [cr-action-menu] Fix anchoring to offscreen elements. (Closed)

Created:
3 years, 6 months ago by calamity
Modified:
3 years, 5 months ago
Reviewers:
dpapad
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, dbeam+watch-elements_chromium.org, michaelpg+watch-elements_chromium.org, oshima+watch_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[cr-action-menu] Fix anchoring to offscreen elements. This CL makes cr-action-menu anchor correctly to offscreen elements. Previously, focusing the anchor element would shift the viewport, which provided the wrong coordinates. By showing the dialog in the top-left, the scroll is reset which correctly calculates the position of the dialog. This CL also takes into account a scrolled body, which offsets the viewport. BUG=734480 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2951703002 Cr-Commit-Position: refs/heads/master@{#483634} Committed: https://chromium.googlesource.com/chromium/src/+/e57f5b9ac01324e8db26dbcdca46544832088a7d

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : fix closure #

Total comments: 4

Patch Set 5 : address comments #

Total comments: 6

Patch Set 6 : address test comments #

Patch Set 7 : address comments #

Total comments: 2

Patch Set 8 : fix nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -37 lines) Patch
M chrome/test/data/webui/cr_elements/cr_action_menu_test.js View 1 2 3 4 5 6 7 1 chunk +83 lines, -0 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js View 1 2 3 4 5 6 8 chunks +83 lines, -37 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (20 generated)
calamity
3 years, 6 months ago (2017-06-20 08:36:51 UTC) #3
dpapad
On 2017/06/20 at 08:36:51, calamity wrote: > I am not able to apply this CL ...
3 years, 6 months ago (2017-06-20 18:15:29 UTC) #4
calamity
Sorry about that, done.
3 years, 6 months ago (2017-06-21 04:35:03 UTC) #6
dpapad
https://codereview.chromium.org/2951703002/diff/80001/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js File ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js (right): https://codereview.chromium.org/2951703002/diff/80001/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js#newcode332 ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js:332: this.style.top = '0'; Should this be '0px' ? https://codereview.chromium.org/2951703002/diff/80001/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js#newcode340 ...
3 years, 6 months ago (2017-06-22 01:36:40 UTC) #11
calamity
https://codereview.chromium.org/2951703002/diff/80001/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js File ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js (right): https://codereview.chromium.org/2951703002/diff/80001/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js#newcode332 ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js:332: this.style.top = '0'; On 2017/06/22 01:36:40, dpapad wrote: > ...
3 years, 6 months ago (2017-06-22 06:41:41 UTC) #13
dpapad
https://codereview.chromium.org/2951703002/diff/120001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js File chrome/test/data/webui/cr_elements/cr_action_menu_test.js (right): https://codereview.chromium.org/2951703002/diff/120001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js#newcode256 chrome/test/data/webui/cr_elements/cr_action_menu_test.js:256: document.body.innerHTML = ` Could we pull out some of ...
3 years, 6 months ago (2017-06-22 21:18:37 UTC) #14
calamity
The scrolling was happening because the wrong element was being scrolled back. Fixed. https://codereview.chromium.org/2951703002/diff/120001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js File ...
3 years, 5 months ago (2017-06-28 04:00:47 UTC) #19
dpapad
lgtm https://codereview.chromium.org/2951703002/diff/160001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js File chrome/test/data/webui/cr_elements/cr_action_menu_test.js (right): https://codereview.chromium.org/2951703002/diff/160001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js#newcode275 chrome/test/data/webui/cr_elements/cr_action_menu_test.js:275: PolymerTest.clearBody(); Nit: Since you are replacing innerHTML below, ...
3 years, 5 months ago (2017-06-28 17:49:40 UTC) #20
calamity
https://codereview.chromium.org/2951703002/diff/160001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js File chrome/test/data/webui/cr_elements/cr_action_menu_test.js (right): https://codereview.chromium.org/2951703002/diff/160001/chrome/test/data/webui/cr_elements/cr_action_menu_test.js#newcode275 chrome/test/data/webui/cr_elements/cr_action_menu_test.js:275: PolymerTest.clearBody(); On 2017/06/28 17:49:40, dpapad wrote: > Nit: Since ...
3 years, 5 months ago (2017-06-29 06:16:16 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2951703002/180001
3 years, 5 months ago (2017-06-29 06:16:29 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/299368)
3 years, 5 months ago (2017-06-29 06:29:54 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2951703002/180001
3 years, 5 months ago (2017-06-29 08:36:44 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/445394)
3 years, 5 months ago (2017-06-29 09:16:24 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2951703002/180001
3 years, 5 months ago (2017-06-30 02:52:19 UTC) #32
commit-bot: I haz the power
3 years, 5 months ago (2017-06-30 04:59:05 UTC) #35
Message was sent while issue was closed.
Committed patchset #8 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/e57f5b9ac01324e8db26dbcdca46...

Powered by Google App Engine
This is Rietveld 408576698