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

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: Static z index. 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 /** @polymerBehavior */
6 var ListItemBehavior = {
7 ensureMaxZIndex: function() {
8 // <iron-list> applies translate3d() transform on every element, which
9 // means that in the natural order the (n-1)-th element is at a lower z
10 // index than the n-th element. This prevents the popup menu from being
11 // painted on top of other elements, and therefore a zIndex adjustment is
12 // necessary.
13 this.style.zIndex = ++ListItemBehavior.maxZIndex_;
14 },
15 };
16
17 /**
18 * The max z index assigned to an <iron-list> item so far. Used to
19 * ensure that the per-item popup menu is displayed correctly.
20 * @private {number}
21 */
22 ListItemBehavior.maxZIndex_ = 0;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698