Commit d0ecf5e9 authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI cr-dialog: Don't play "pulse" animation when clicking on the scrollbar.

Bug: 746294
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ie50a57965ca0cea2d5415ac3a6ffea88d6d38201
Reviewed-on: https://chromium-review.googlesource.com/578294Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488466}
parent 09fa66e1
...@@ -17,17 +17,17 @@ ...@@ -17,17 +17,17 @@
box-shadow: 0 0 16px rgba(0, 0, 0, 0.12), box-shadow: 0 0 16px rgba(0, 0, 0, 0.12),
0 16px 16px rgba(0, 0, 0, 0.24); 0 16px 16px rgba(0, 0, 0, 0.24);
color: inherit; color: inherit;
overflow: auto;
padding: 0; padding: 0;
top: 0; top: 0;
width: 512px; width: 512px;
} }
:host([open]) { :host([open]) #content-wrapper {
/* Keep max-height within viewport, and flex content accordingly. */ /* Keep max-height within viewport, and flex content accordingly. */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-height: 100vh; max-height: 100vh;
overflow: auto;
} }
/* When needing to flex, force .body-container alone to shrink. */ /* When needing to flex, force .body-container alone to shrink. */
...@@ -118,22 +118,26 @@ ...@@ -118,22 +118,26 @@
padding: 10px; /* Makes the actual icon 16x16. */ padding: 10px; /* Makes the actual icon 16x16. */
} }
</style> </style>
<div class="top-container"> <!-- This wrapper is necessary, such that the "pulse" animation is not
<div class="title-container" tabindex="-1"> erroneously played when the user clicks on the outer-most scrollbar. -->
<slot name="title"></slot> <div id="content-wrapper">
<div class="top-container">
<div class="title-container" tabindex="-1">
<slot name="title"></slot>
</div>
<button is="paper-icon-button-light" class="icon-clear" id="close"
aria-label$="[[closeText]]" hidden$="[[noCancel]]" on-tap="cancel"
on-keypress="onCloseKeypress_">
</button>
</div> </div>
<button is="paper-icon-button-light" class="icon-clear" id="close" <div class="body-container">
aria-label$="[[closeText]]" hidden$="[[noCancel]]" on-tap="cancel" <span id="bodyTopMarker"></span>
on-keypress="onCloseKeypress_"> <slot name="body"></slot>
</button> <span id="bodyBottomMarker"></span>
</div> </div>
<div class="body-container"> <slot name="button-container"></slot>
<span id="bodyTopMarker"></span> <slot name="footer"></slot>
<slot name="body"></slot>
<span id="bodyBottomMarker"></span>
</div> </div>
<slot name="button-container"></slot>
<slot name="footer"></slot>
</template> </template>
<script src="cr_dialog.js"></script> <script src="cr_dialog.js"></script>
</dom-module> </dom-module>
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