Commit 9ce7d0c3 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Fix manage link

If the "No destinations" message was visible in the recent destinations
list, the iron-list containing the destinations was pushed down and
extended invisibly over the "Manage" link for the print destinations,
preventing the link from working.

Fix this by ensuring that the iron-lists are the correct height: height
of the parent - height of parent's header line - height of "No
destinations" message (if showing).

Bug: 868274
Change-Id: Idf574923d69ae1c0ff1265efe62b9cc67b70af11
Reviewed-on: https://chromium-review.googlesource.com/1153430
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579306}
parent fc287130
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
user-select: none; user-select: none;
} }
:host #list {
height: 100%;
}
:host > header { :host > header {
background-color: transparent; background-color: transparent;
border-bottom: 1px solid #d2d2d2; border-bottom: 1px solid #d2d2d2;
......
...@@ -41,6 +41,7 @@ Polymer({ ...@@ -41,6 +41,7 @@ Polymer({
hasDestinations_: { hasDestinations_: {
type: Boolean, type: Boolean,
value: true, value: true,
observer: 'hasDestinationsChanged_',
}, },
/** @private {boolean} */ /** @private {boolean} */
...@@ -116,5 +117,12 @@ Polymer({ ...@@ -116,5 +117,12 @@ Polymer({
onDestinationSelected_: function(e) { onDestinationSelected_: function(e) {
this.fire('destination-selected', e.target); this.fire('destination-selected', e.target);
}, },
/** @private */
hasDestinationsChanged_: function() {
// If there are no destinations, leave space for "no destinations" message.
this.$.list.style.height = this.hasDestinations_ ?
'calc(100% - 1rem - 9px)' : 'calc(100% - 2rem - 9px)';
},
}); });
})(); })();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment