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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js

Issue 2728573003: Files app: Work around the issue about opening menus by keeping references to <hr>s. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index ce7f1cb8b25a7bbb7ab51cb13a5f31f72767701e..d4a013cb30cc154bae4ed9f623240d7bba6ec5d5 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -34,6 +34,16 @@ function FileManagerUI(providersModel, element, launchParam) {
this.dialogType_ = launchParam.type;
/**
+ * <hr> elements in cr.ui.Menu.
+ * This is a workaround for crbug.com/689255. This member variable is just for
+ * keeping explicit reference to decorated <hr>s to prevent GC from collecting
+ * <hr> wrappers, and not used anywhere.
+ * TODO(fukino): Remove this member variable once the root cause is fixed.
+ * @private {!Array<!Element>}
+ */
+ this.separators_ = [].slice.call(document.querySelectorAll('cr-menu > hr'));
+
+ /**
* Error dialog.
* @type {!ErrorDialog}
* @const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698