Bug 1277571 - Bind the scroll function to this in breadcrumbs to pass it to event handlers; r=jdescottes draft
authorPatrick Brosset <pbrosset@mozilla.com>
Thu, 02 Jun 2016 16:32:46 +0200
changeset 374447 1252ab8e944f0cc17052e3ff4f5ed2cb29fa614e
parent 374064 5d2cb7fff024a1d3ed59ad2432882d158ce5ee91
child 522636 1b3c2bd50b9dc5a75aa5ed14affe15031548282b
push id20024
push userpbrosset@mozilla.com
push dateThu, 02 Jun 2016 14:33:08 +0000
reviewersjdescottes
bugs1277571
milestone49.0a1
Bug 1277571 - Bind the scroll function to this in breadcrumbs to pass it to event handlers; r=jdescottes MozReview-Commit-ID: bi6ix3k3Ey
devtools/client/inspector/breadcrumbs.js
--- a/devtools/client/inspector/breadcrumbs.js
+++ b/devtools/client/inspector/breadcrumbs.js
@@ -327,16 +327,17 @@ HTMLBreadcrumbs.prototype = {
 
   _init: function () {
     this.outer = this.chromeDoc.getElementById("inspector-breadcrumbs");
     this.arrowScrollBox = new ArrowScrollBox(
         this.chromeWin,
         this.outer);
 
     this.container = this.arrowScrollBox.inner;
+    this.scroll = this.scroll.bind(this);
     this.arrowScrollBox.on("overflow", this.scroll);
 
     // These separators are used for CSS purposes only, and are positioned
     // off screen, but displayed with -moz-element.
     this.separators = this.chromeDoc.createElementNS(NS_XHTML, "div");
     this.separators.className = "breadcrumb-separator-container";
     this.separators.innerHTML =
                       "<div id='breadcrumb-separator-before'></div>" +