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

Unified Diff: ui/webui/resources/js/cr/ui/splitter.js

Issue 2864433002: [MD Bookmarks] Add hover border to sidebar splitter. (Closed)
Patch Set: Created 3 years, 7 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
Index: ui/webui/resources/js/cr/ui/splitter.js
diff --git a/ui/webui/resources/js/cr/ui/splitter.js b/ui/webui/resources/js/cr/ui/splitter.js
index b4260e1b185b664c950c63111863ee186c5ec54b..466c2776c1c273fc903f13c20bccc5d836f243be 100644
--- a/ui/webui/resources/js/cr/ui/splitter.js
+++ b/ui/webui/resources/js/cr/ui/splitter.js
@@ -233,11 +233,13 @@ cr.define('cr.ui', function() {
*/
handleSplitterDragStart: function() {
// Use the computed width style as the base so that we can ignore what
- // box sizing the element has.
+ // box sizing the element has. Add the difference between offset and
+ // client widths to account for any scrollbars.
var targetElement = this.getResizeTarget_();
var doc = targetElement.ownerDocument;
this.startWidth_ =
- parseFloat(doc.defaultView.getComputedStyle(targetElement).width);
+ parseFloat(doc.defaultView.getComputedStyle(targetElement).width) +
+ targetElement.offsetWidth - targetElement.clientWidth;
},
/**

Powered by Google App Engine
This is Rietveld 408576698