ICEfaces
  1. ICEfaces
  2. ICE-11520

ace:richTextEntry, timing issue with saveOnSubmit

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P08, EE-4.3.0.GA_P03
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any

      Description

      There's a timing issue with ace:richTextEntry and saveOnSubmit when submitting the form by an external component. What happens is that the value of the ace:richTextEntry component is only made available for submission when the component is blurred. So, if an external component, such as a button, triggers a form submission by an onclick event (while the ace:richTextEntry component has focus) the blur event of the ace:richTextEntry doesn't get executed before the onclick event of the other component, so what's submitted is not the latest value of the ace:richTextEntry component. This issue is clearly seen when submitting the form via a menut item. When using a simple h:commandButton, this issue usually doesn't happen, but it does happen some times. Clicking a second time on the submit button does update the value correctly.

      This JIRA is to find a better approach to prevent this issue or to adjust the delays with which events are triggered.

        Activity

        Arturo Zambrano created issue -
        Arturo Zambrano made changes -
        Field Original Value New Value
        Assignee Arturo Zambrano [ artzambrano ]
        Arturo Zambrano made changes -
        Fix Version/s EE-3.3.0.GA_P09 [ 13781 ]
        Arturo Zambrano made changes -
        Description There's a timing issue with ace:richTextEntry and saveOnSubmit when submitting the form by an external component. What happens is that the value of the ace:richTextEntry component is only made available for submission when the component is blurred. So, if an external component, such as a button, triggers a form submission by an onclick event, the blur event of the ace:richTextEntry doesn't get executed before the onclick event of the other component, so what's submitted is not the latest value of the ace:richTextEntry component. This issue is clearly seen when submitting the form via a menut item. When using a simple h:commandButton, this issue usually doesn't happen, but it does happen some times.

        This issue is to find a better approach to prevent this issue or to adjust the delays with which events are triggered.
        There's a timing issue with ace:richTextEntry and saveOnSubmit when submitting the form by an external component. What happens is that the value of the ace:richTextEntry component is only made available for submission when the component is blurred. So, if an external component, such as a button, triggers a form submission by an onclick event (while the ace:richTextEntry component has focus) the blur event of the ace:richTextEntry doesn't get executed before the onclick event of the other component, so what's submitted is not the latest value of the ace:richTextEntry component. This issue is clearly seen when submitting the form via a menut item. When using a simple h:commandButton, this issue usually doesn't happen, but it does happen some times. Clicking a second time on the submit button does update the value correctly.

        This JIRA is to find a better approach to prevent this issue or to adjust the delays with which events are triggered.
        Hide
        Arturo Zambrano added a comment -

        r53422: Save ace:richTextEntry editor value to the textarea element that gets submitted in the request, at every change instead of only on blur, so that the latest value in the editor gets submitted when a request is initiated via an external component.

        Show
        Arturo Zambrano added a comment - r53422: Save ace:richTextEntry editor value to the textarea element that gets submitted in the request, at every change instead of only on blur, so that the latest value in the editor gets submitted when a request is initiated via an external component.
        Arturo Zambrano made changes -
        Fix Version/s EE-4.3.0.GA_P04 [ 13876 ]
        Arturo Zambrano made changes -
        Affects Version/s EE-4.3.0.GA_P03 [ 13570 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #53425 Fri Oct 01 16:29:45 MDT 2021 art.zambrano ICE-11520 Save ace:richTextEntry editor value to the textarea element that gets submitted in the request, at every change instead of only on blur, so that the latest value in the editor gets submitted when a request is initiated via an external component
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/richtextentry/richtextentry.js
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Arturo Zambrano added a comment - - edited

        r53424: Backported fix to the 3.3 P09 tag.
        r53425: Backported fix to the 4.3 trunk.

        Show
        Arturo Zambrano added a comment - - edited r53424: Backported fix to the 3.3 P09 tag. r53425: Backported fix to the 4.3 trunk.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: