Commit 53507168 authored by Joel Hockey's avatar Joel Hockey

WebUI dialog: Pulse on container rather than frame

In FilesApp, we set |overflow: auto| on .cr-dialog-container to allow
scrolling on dialogs such as the chrome web store dialog which requires
scrolling to work on small screens.

The pulse event when a user clicks on .cr-dialog-container causes
the frame (dialog box) to increase in size by 2% for 180ms.
This is causing scrollbars to flash on during that time which
is not desirable.

By setting the pulse to increase the entire .cr-dialog-container
rather than just the frame, we get the same intended visual effect,
but without scrollbar flicker.

Bug: 883671
Change-Id: I3fb75bef14059bc92b8baa2367290a16b0b0e08f
Reviewed-on: https://chromium-review.googlesource.com/c/1341432Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609185}
parent fbf4c62f
......@@ -244,7 +244,7 @@ html[dir='rtl'] .entry-name {
}
}
.cr-dialog-frame.pulse {
.cr-dialog-container.pulse {
animation-duration: 180ms;
animation-iteration-count: 1;
animation-name: pulse;
......
......@@ -112,7 +112,7 @@ cr.define('cr.ui.dialogs', function() {
/** @private */
BaseDialog.prototype.onContainerMouseDown_ = function(event) {
if (event.target == this.container_) {
var classList = this.frame_.classList;
var classList = this.container_.classList;
// Start 'pulse' animation.
classList.remove('pulse');
setTimeout(classList.add.bind(classList, 'pulse'), 0);
......
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