ICEfaces
  1. ICEfaces
  2. ICE-10049

Showcase ice:inputRichText Save on Submit is not functioning.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02
    • Fix Version/s: EE-3.3.0.GA_P03
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Tomcat 6/7, Icefaces ee Jenkins build 430, ee-3.3.0 maintenance branch r 41207, all browsers.
    • Assignee Priority:
      P3

      Description

      Toggling Save on Submit from Enabled to Disabled has no effect in the demo. The data is saved either way. If Save on Submit is disabled, then the only time data should be saved is when the Save button is explicilty clicked by the user.

      To reproduce:
      Build/deploy Showcase
      Navigate to ICE Components > ice:inputRichText >Save on Submit.
      Toggle the Disable radio button
      Enter text in the editor
      Press the Perform a Submit button
      Test fails because Saved Text String is updated to display the entered and saved text.

        Activity

        Hide
        Carmen Cristurean added a comment -

        This is also reproducible with EE-3.3.0-maintenance branch r. 43351.

        Show
        Carmen Cristurean added a comment - This is also reproducible with EE-3.3.0-maintenance branch r. 43351.
        Hide
        Arturo Zambrano added a comment - - edited

        The cause of this issue is that the new version of CKEditor that we're using (4.3.3) automatically updates the textarea element right before submitting the form, as explained on this page http://docs.ckeditor.com/#!/guide/dev_savedata under 'Saving Data in CKEditor Replacing a Textarea'. The previous version didn't do this. There doesn't seem to be a configuration setting to disable this behaviour. One possible solution would be to use an extra textarea of which CKEditor is not aware of, and use that as the value holder when submitting.

        Note that this issue might also be present in ace:richTextEntry.

        Show
        Arturo Zambrano added a comment - - edited The cause of this issue is that the new version of CKEditor that we're using (4.3.3) automatically updates the textarea element right before submitting the form, as explained on this page http://docs.ckeditor.com/#!/guide/dev_savedata under 'Saving Data in CKEditor Replacing a Textarea'. The previous version didn't do this. There doesn't seem to be a configuration setting to disable this behaviour. One possible solution would be to use an extra textarea of which CKEditor is not aware of, and use that as the value holder when submitting. Note that this issue might also be present in ace:richTextEntry.
        Hide
        Arturo Zambrano added a comment -

        Fixed issue by disabling the behaviour of automatically updating the underlying textarea when the form is submitted in the CKEditor code.

        Committed fix for ice:inputRichText at revision 43605, for ace:richTextEntry at revision 43606, and for ace:richTextEntry in the 4.0 trunk at revision 43607.

        Show
        Arturo Zambrano added a comment - Fixed issue by disabling the behaviour of automatically updating the underlying textarea when the form is submitted in the CKEditor code. Committed fix for ice:inputRichText at revision 43605, for ace:richTextEntry at revision 43606, and for ace:richTextEntry in the 4.0 trunk at revision 43607.
        Hide
        Carmen Cristurean added a comment - - edited

        EE-3.3-maintenance r43607/ IE10, Chrome39, FF33:
        Testing ice:inputRichText with Save on Submit disabled is resolved now, no changes are shown until the Save button is clicked.
        However if Save on Submit is enabled, the text updates in the Rich text component are rendered only if the Perform a Submit button is clicked twice for any change (all browsers).

        The same behavior was found for ace:richTextEntry with saveOnSubmit=true (EE-3.3-maintenance and IF4 trunk r.43607): must click the Submit button twice to see the text changes rendered on page.
        QA test application:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/richTextEntry
        Test: /richTextEntryDynAttribute.jsf

        Steps:

        • on the /richTextEntryDynAttribute.jsf page, check the saveOnSubmit check box.
        • type "some text" in the richTextEntry component, and click on Submit button.
          Expected: the entered text should be seen rendered on the page: Value:<p>some text</p>
          Actual: entered text is not rendered on page, until user clicks a second time on Submit button.
        Show
        Carmen Cristurean added a comment - - edited EE-3.3-maintenance r43607/ IE10, Chrome39, FF33: Testing ice:inputRichText with Save on Submit disabled is resolved now, no changes are shown until the Save button is clicked. However if Save on Submit is enabled, the text updates in the Rich text component are rendered only if the Perform a Submit button is clicked twice for any change (all browsers). The same behavior was found for ace:richTextEntry with saveOnSubmit=true (EE-3.3-maintenance and IF4 trunk r.43607): must click the Submit button twice to see the text changes rendered on page. QA test application: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/richTextEntry Test: /richTextEntryDynAttribute.jsf Steps: on the /richTextEntryDynAttribute.jsf page, check the saveOnSubmit check box. type "some text" in the richTextEntry component, and click on Submit button. Expected: the entered text should be seen rendered on the page: Value:<p>some text</p> Actual: entered text is not rendered on page, until user clicks a second time on Submit button.
        Hide
        Arturo Zambrano added a comment -

        Committed fix to read the saveOnSubmit setting from within the CKEditor code, in order to keep the normal behaviour of automatically updating the textarea when submitting the form, so that submit buttons can be clicked immediately after leaving the editor, without having to first blur the editor to execute the update listener and then submit the form (revisions 43614, 43615, 43616).

        Show
        Arturo Zambrano added a comment - Committed fix to read the saveOnSubmit setting from within the CKEditor code, in order to keep the normal behaviour of automatically updating the textarea when submitting the form, so that submit buttons can be clicked immediately after leaving the editor, without having to first blur the editor to execute the update listener and then submit the form (revisions 43614, 43615, 43616).
        Hide
        Carmen Cristurean added a comment -

        EE-3.3-maintenance r43622: showcase > ice:inputRichText saveOnSubmit works as expected (IE10, Chrome39, FF33).

        ace:richTextEntry: if saveOnSubmit=true, the value is updated on page only when clicking a second time on "save on Submit" button (IE10 and FF33 only; no such issue in Chrome39). This issue can be reproduced with the steps above using the ace:richTextEntry QA test app.

        Show
        Carmen Cristurean added a comment - EE-3.3-maintenance r43622: showcase > ice:inputRichText saveOnSubmit works as expected (IE10, Chrome39, FF33). ace:richTextEntry: if saveOnSubmit=true, the value is updated on page only when clicking a second time on "save on Submit" button (IE10 and FF33 only; no such issue in Chrome39). This issue can be reproduced with the steps above using the ace:richTextEntry QA test app.
        Hide
        Arturo Zambrano added a comment -

        The last issue is not related to this fix, as it could be reproduced before, and it only happens the first time the form is submitted when dynamically changing an attribute in the ace:richTextEntry component, as in the dynamic attribute test page. After that, all subsequent form submissions update the value of the component correctly.

        This seems to be an issue with the browsers themselves, for some reason they are unable to update the textarea value dynamically the first time the form is submitted, even though the CKEditor code to update it is correct and doesn't cause errors.

        Show
        Arturo Zambrano added a comment - The last issue is not related to this fix, as it could be reproduced before, and it only happens the first time the form is submitted when dynamically changing an attribute in the ace:richTextEntry component, as in the dynamic attribute test page. After that, all subsequent form submissions update the value of the component correctly. This seems to be an issue with the browsers themselves, for some reason they are unable to update the textarea value dynamically the first time the form is submitted, even though the CKEditor code to update it is correct and doesn't cause errors.
        Hide
        Ken Fyten added a comment -

        Since this issue appears to be an IE browser bug, and only occurs if you dynamically set the attribute (which is an unlikely scenario in a real-world app.), we'll consider this a known issue.

        Resolved.

        Show
        Ken Fyten added a comment - Since this issue appears to be an IE browser bug, and only occurs if you dynamically set the attribute (which is an unlikely scenario in a real-world app.), we'll consider this a known issue. Resolved.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: