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

Unified Diff: ui/file_manager/file_manager/foreground/elements/files_tooltip.js

Issue 2213833002: Fix files-tooltip to consider RTL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed a comment Created 4 years, 4 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/elements/files_tooltip.js
diff --git a/ui/file_manager/file_manager/foreground/elements/files_tooltip.js b/ui/file_manager/file_manager/foreground/elements/files_tooltip.js
index cf1c727538d609c4fd1ff161b3684ad0eb8d4e69..cc7059f002cc52afdbf3153eb5ffb4a56ac77905 100644
--- a/ui/file_manager/file_manager/foreground/elements/files_tooltip.js
+++ b/ui/file_manager/file_manager/foreground/elements/files_tooltip.js
@@ -167,7 +167,9 @@ var FilesTooltip = Polymer({
this.style.top = `${Math.round(top)}px`;
var left = rect.left + rect.width / 2 - this.offsetWidth / 2;
- if (left + this.offsetWidth > document.body.offsetWidth)
+ if (left < 0)
+ left = 0;
+ if (left > document.body.offsetWidth - this.offsetWidth)
left = document.body.offsetWidth - this.offsetWidth;
this.style.left = `${Math.round(left)}px`;
« 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