Permalink
Browse files

Merge pull request #221 from mhammond/panel-resize

Bug 675576 - panel.resize doesn't work if panel is currently shown. r=myk
  • Loading branch information...
2 parents e9587be + 17316eb commit e0d29c1e76e183047e3bcbadbfc4e01b0c4fc2ed @mykmelez mykmelez committed Aug 2, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 packages/addon-kit/lib/panel.js
@@ -257,7 +257,13 @@ const Panel = Symbiont.resolve({
resize: function resize(width, height) {
this.width = width;
this.height = height;
- this._xulPanel.sizeTo(width, height);
+ // Resize the iframe instead of using panel.sizeTo
+ // because sizeTo doesn't work with arrow panels
+ let xulPanel = this._xulPanel;
+ if (xulPanel) {
+ xulPanel.firstChild.style.width = width + "px";
+ xulPanel.firstChild.style.height = height + "px";
+ }
},
// While the panel is visible, this is the XUL <panel> we use to display it.

0 comments on commit e0d29c1

Please sign in to comment.