Button not working on browser resizing

Hi @simon,

I tried to use a solution, which you provided for a similar problem at : goJS diagram eating mouse up event - #12 by simon

Solution provided:

var mouseOnDiagram = false;
myDiagram.toolManager.doMouseDown = function () {
    go.ToolManager.prototype.doMouseDown.call(this);
    mouseOnDiagram = true;
};

myDiagram.toolManager.doMouseUp = function () {
    go.ToolManager.prototype.doMouseUp.call(this);
    mouseOnDiagram = false;
};

myDiagram.doFocus = function() {
  if (mouseOnDiagram) this.focus();
};

But problem is that, it’s working for once only.
Means, suppose am on a UI, where there are 3 buttons in a div. If I click on one of the button in the div, it will work, but after that, if i click on another button in the same div, it again behaves like it was behaving earlier, taking Canvas to left=0.