Affects Version/s: liferay-faces-3.0.0-ga1, liferay-faces-3.1.0-ga1
Environment:OS: Linux (Ubuntu x86_64 12.04 LTS)
Browser: Firefox 15.0.1, Chrome 20.0.1132.47
Liferay: 6.0.12 (6.0 EE SP2), Liferay 6.1.20 (6.1 EE GA2) with Tomcat 7.x
Liferay Faces 3.0.0 GA1
Liferay Faces 3.0.x (GIT ID: 3a1f6339006a4cb3d4354c71ee2a8b5d2cc430bc)
Liferay Faces 3.1.x (GIT ID: b6ab311d0c64042d5748c5eb80d0f0d2a5e8085d)OS: Linux (Ubuntu x86_64 12.04 LTS) Browser: Firefox 15.0.1, Chrome 20.0.1132.47 Liferay: 6.0.12 (6.0 EE SP2), Liferay 6.1.20 (6.1 EE GA2) with Tomcat 7.x Liferay Faces 3.0.0 GA1 Liferay Faces 3.0.x (GIT ID: 3a1f6339006a4cb3d4354c71ee2a8b5d2cc430bc) Liferay Faces 3.1.x (GIT ID: b6ab311d0c64042d5748c5eb80d0f0d2a5e8085d)
Using Liferay Faces in such a scenario when <liferay-ui:input-editor/> component should be hidden and shown again in case of partial-page rendering does not work.
If partial rendering is not involved and the whole page gets reloaded over the course of the JSF lifecycle, everything is working as intended.
The following piece demonstrates the desired use case:
The phenomenon (with 3.0.0-GA1) is the following: if a button is clicked on CKEditor's toolbar (which pops up a modal dialog box) and the component has been previously hidden/shown, the whole page is shadowed and that background cover does not go away when the modal dialog is dismissed.
Debugging reveled that CKEditor performs modifications to the DOM tree of the page during initialization and among others, it inserts a <div class="cke_dialog_background_cover" ... /> tag as a direct child of the body element in order to be able to cover the whole background when modal dialogs of CKEditor are shown. (In case of Firefox a small snippet of JS code also gets inserted into <body onpageshow="..."/>.)
When actions are being performed on the page (eg. show/hide) and partial rendering is used, CKEditor is re-initialized and over the course of that, the aforementioned <div/> element gets duplicated (and the JS snippet is inserted into <body onpageshow="..."/> again). Because of that duplication using modal dialogs in CKEditor becomes broken.
The behaviour mentioned above applies to 3.0.0-GA and 3.1.0-GA1, however (possibly) as of the introduction of fix
FACES-1422 rendering <style/> and <script/> elements for CKEditor is being prevented by InputEditorInternalRenderer, if a resource request has been made. In this case (3.0.1-GA2 and 3.1.1-GA2), clicking on the hide button works correctly and CKEditor disappears, but after clicking the show again CKEditor is not rendered at all, since that <script/> element should have been sent to the browser in order to perform initialization.
I've dropped a few sample projects for various (Liferay Faces versions) we were experimenting with to Github: