Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit b90673f

Browse files
committed
lightning-item-iframe: use collapsed attribute to display/hide HTML editor
As advised by the "Rapid Application Development with Mozilla" book by Nigel McFarlane. Indeed, a tag sole any binding when we use attribute like "display:none" because a XBL binding requires a frame (styleable area). Fixes #28
1 parent 54d5c87 commit b90673f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

chrome/content/lightning-item-iframe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ exchangeEventDialog.prototype = {
151151
this._document.getElementById("item-description").hidden = true;
152152

153153
// Display our own HTML content editor
154-
itemBodyEditor.hidden = false;
154+
itemBodyEditor.setAttribute("collapsed", "false");;
155155

156156
itemBodyEditor.setAttribute("scrollbars","yes");
157157
}
@@ -256,7 +256,7 @@ exchangeEventDialog.prototype = {
256256
if (aCalendar.type !== "exchangecalendar") {
257257
// Hidde HTML content editor
258258
this._document.getElementById("item-description").hidden = false;
259-
this._document.getElementById("exchWebService-body-editor").hidden = true;
259+
this._document.getElementById("exchWebService-body-editor").setAttribute("collapsed", "true");
260260
}
261261
},
262262

chrome/content/lightning-item-iframe.xul

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
flex="1"
143143
insertafter="item-description"
144144
disable-on-readonly="true"
145-
hidden="true"/>
145+
collapsed="true"/>
146146
</tabpanel>
147147

148148
</tabpanels>

0 commit comments

Comments
 (0)