Commit 4812c4e7 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

FilesApp fix DOMException: Failed to execute 'removeChild' on 'Node'

Bug: 813477
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Iafe64af611275d2a434ad533c3c615a9ccb8abf5
Reviewed-on: https://chromium-review.googlesource.com/1119739
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571425}
parent 8a1278f5
......@@ -277,7 +277,10 @@ cr.define('cr.ui.dialogs', function() {
var self = this;
setTimeout(function() {
// Wait until the transition is done before removing the dialog.
self.parentNode_.removeChild(self.container_);
// It is possible to show/hide/show/hide and have hide called twice
// and container_ already removed from parentNode_.
if (self.parentNode_ === self.container_.parentNode)
self.parentNode_.removeChild(self.container_);
if (opt_onHide)
opt_onHide();
}, BaseDialog.ANIMATE_STABLE_DURATION);
......
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