enonic / app-contentstudio

Content Studio of Enonic XP
GNU General Public License v3.0
10 stars 4 forks source link

Errors appear in console after inserting and applying of a caption for an image in Site Configurator dialog #50

Closed jsi closed 5 years ago

jsi commented 5 years ago

@sgauruseu commented on Tue Jan 08 2019

  1. Open a site configurator modal dialog (html area should be configured)
  2. Insert an image in htmlarea and press Apply button
  3. Open 'site configurator' dialog again. Do not open Insert Image Dialog, click bellow the image and type a caption for the image
  4. Press 'Apply' button

Bug: errors appears in the browser console

image

Body mask remains on the page when the modal dialog is closed.

image

_all.js:1 Uncaught TypeError: Cannot read property 'getSelection' of undefined at CKEDITOR.dom.selection.getNative (_all.js:1) at new CKEDITOR.dom.selection (_all.js:1) at a.CKEDITOR.editor.getSelection (_all.js:1) at a.elementPath (_all.js:1) at a.<anonymous> (_all.js:1) at a.p (_all.js:1) at a.<anonymous> (_all.js:1) at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (_all.js:1) at a.setActiveFilter (_all.js:1) at n (_all.js:1) getNative @ _all.js:1 CKEDITOR.dom.selection @ _all.js:1 CKEDITOR.editor.getSelection @ _all.js:1 elementPath @ _all.js:1 (anonymous) @ _all.js:1 p @ _all.js:1 (anonymous) @ _all.js:1 window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire @ _all.js:1 setActiveFilter @ _all.js:1 n @ _all.js:1 destroy @ _all.js:1 destroyAll @ _all.js:1 (anonymous) @ _all.js:1 p @ _all.js:1 (anonymous) @ _all.js:1 window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire @ _all.js:1 detach @ _all.js:1 (anonymous) @ _all.js:1 detach @ _all.js:1 detach @ _all.js:1 CKEDITOR.editor.editable @ _all.js:1 destroy @ _all.js:1 HtmlEditor.destroy @ bundle.js:1 HtmlArea.destroyEditor @ bundle.js:1 (anonymous) @ bundle.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 (anonymous) @ _all.js:1 Element.notifyRemoved @ _all.js:1 Element.removeChildElement @ _all.js:1 Element.removeChild @ _all.js:1 ModalDialog.hide @ _all.js:1 ModalDialog.close @ _all.js:1 ApplicationConfiguratorDialog.close @ _all.js:1 (anonymous) @ _all.js:1 (anonymous) @ _all.js:1 Action.execute @ _all.js:1 (anonymous) @ _all.js:1 _all.js:19536 Uncaught TypeError: Cannot read property 'getSelection' of undefined at CKEDITOR.dom.selection.getNative (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:220750) at new CKEDITOR.dom.selection (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:219739) at a.CKEDITOR.editor.getSelection (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:218459) at b (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:212817) at a.<anonymous> (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:217014) at a.p (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:3960) at a.<anonymous> (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:4817) at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:5491) at a.setData (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:137020) at Function.HtmlEditor.setData (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/js/bundle.js:1:313088) From previous event: at SiteConfigurator.update (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/js/bundle.js:1:846043) at BaseInputTypeManagingAdd._this.propertyArrayListener (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:993648) at http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:249939 at Array.forEach (<anonymous>) at PropertyArray.forwardPropertyValueChangedEvent (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:249905) at PropertyArray.propertyValueChangedEventHandler (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:239704) at http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:265354 at Array.forEach (<anonymous>) getNative @ _all.js:1 CKEDITOR.dom.selection @ _all.js:1 CKEDITOR.editor.getSelection @ _all.js:1 b @ _all.js:1 (anonymous) @ _all.js:1 p @ _all.js:1 (anonymous) @ _all.js:1 window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire @ _all.js:1 setData @ _all.js:1 HtmlEditor.setData @ bundle.js:1 HtmlArea.setEditorContent @ bundle.js:1 HtmlArea.updateFormInputElValue @ bundle.js:1 BaseInputTypeNotManagingAdd.updateInputOccurrenceElement @ _all.js:1 InputOccurrenceView.update @ _all.js:1 InputOccurrences.updateOccurrenceView @ _all.js:1 (anonymous) @ _all.js:1 (anonymous) @ _all.js:1 PropertyArray.forEach @ _all.js:1 FormItemOccurrences.update @ _all.js:1 BaseInputTypeNotManagingAdd.update @ _all.js:1 InputView.update @ _all.js:1 (anonymous) @ _all.js:1 FormItemLayer.update @ _all.js:1 FormView.update @ _all.js:1 (anonymous) @ bundle.js:1 (anonymous) @ bundle.js:1 _fulfilled @ _all.js:20191 (anonymous) @ _all.js:20220 Promise.promise.promiseDispatch @ _all.js:20153 (anonymous) @ _all.js:19913 flush @ _all.js:19512 setTimeout (async) flush @ _all.js:19535 _all.js:1 TypeError: Cannot read property 'getSelection' of undefined at CKEDITOR.dom.selection.getNative (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:220750) at new CKEDITOR.dom.selection (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:219739) at a.CKEDITOR.editor.getSelection (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:218459) at b (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:212817) at a.<anonymous> (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:217014) at a.p (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:3960) at a.<anonymous> (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:4817) at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:5491) at a.setData (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/lib/_all.js:1:137020) at Function.HtmlEditor.setData (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/js/bundle.js:1:313088) From previous event: at SiteConfigurator.update (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/js/bundle.js:1:846043) at InputView.update (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:952592) at http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:948051 at Array.map (<anonymous>) at FormItemLayer.update (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:948004) at FormView.update (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/admin/common/js/_all.js:1:960305) at ContentWizardStepForm.update (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/js/bundle.js:1:993605) at ContentWizardPanel.updateWizardStepForms (http://localhost:8080/admin/tool/com.enonic.xp.app.contentstudio/main/_/asset/com.enonic.xp.app.contentstudio:1546941943/js/bundle.js:1:1655407

ashklianko commented 5 years ago

Issue is related to same problems seen in https://github.com/enonic/app-contentstudio/issues/44

Added commit into https://github.com/enonic/app-contentstudio/pull/95