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

Side by Side Diff: chrome/browser/resources/settings/list_item_behavior.js

Issue 2375493003: MD Settings: Fix rendering of popup menus inside iron-lists. (Closed)
Patch Set: Fix compilation. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * The max z index assigned to an <iron-list> item so far. Used to
7 * ensure that the per-item popup menu is displayed correctly.
8 * @private {number}
9 */
10 var maxZIndex_ = 0;
11
12 /** @polymerBehavior */
13 var ListItemBehavior = {
14 showActionMenu: function() {
Dan Beam 2016/09/27 23:02:04 this really doesn't show any action menu. it real
dpapad 2016/09/28 00:13:35 Renamed.
15 // <iron-list> applies translate3d() transform on every element, which
16 // means that in the natural order the (n-1)-th element is at a lower z
17 // index than the n-th element. This prevents the popup menu from being
18 // painted on top of other elements, and therefore a zIndex adjustment is
19 // necessary.
20 this.style.zIndex = ++maxZIndex_;
21 },
22 };
Dan Beam 2016/09/27 23:02:04 can we make this static and private? ListItemBeha
dpapad 2016/09/28 00:13:35 Already responded to Steven's similar question. Tr
Dan Beam 2016/09/28 01:32:07 I can see how this would look a little confusing.
dpapad 2016/09/28 01:50:32 Done. Thanks for the clarification. I misunderstoo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698