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

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: Nit 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 cr.define('settings', function() {
stevenjb 2016/09/26 22:52:00 Optional: It seems like this might be generally us
dpapad 2016/09/26 23:04:32 Prefer to wait until the 2nd client of this class
6 /**
7 * The max z index assigned to an <iron-list> item so far. Used to
8 * ensure that the per-item popup menu is displayed correctly.
9 * @type {number}
10 */
11 var maxZIndex = 0;
stevenjb 2016/09/26 22:52:00 nit: maxZIndex_ since it's private
dpapad 2016/09/26 23:04:32 Done.
12
13 var ListItemBehavior = {
14 showActionMenu: function() {
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 };
23
24 return {
25 ListItemBehavior: ListItemBehavior,
26 };
27 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698