Skip to content

Commit

Permalink
Correctly insert button into toolbar (Australis)
Browse files Browse the repository at this point in the history
Buttons may be placed not directly on toolbar...
(#121)
  • Loading branch information
Infocatcher committed Nov 20, 2013
1 parent f8f7741 commit e422821
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2025,14 +2025,18 @@ var windowsObserver = {
}
break;
}
toolbar.insertBefore(tb, insPos);
var insParent = insPos && insPos.parentNode
|| toolbar.getElementsByAttribute("class", "customization-target")[0]
|| toolbar;
insParent.insertBefore(tb, insPos);
if(newTabBtn && insPos && this.hasNodeAfter(tb, "new-tab-button"))
newTabBtn.parentNode.insertBefore(newTabBtn, tb2.nextSibling);
this.updateShowAfterTabs(tb, document);
_log("Insert toolbar button " + (insPos ? "before " + insPos.id : "at the end"));
return;
}

_log("Insert toolbar button into palette");
this.getToolbox(window)
.palette
.appendChild(tb);
Expand Down

0 comments on commit e422821

Please sign in to comment.