Dirty check for rich text fields

I have enable dirty check to warn users when they have unsaved changes. To do this I including a section with


pega.u.d.bUseNativeDirtyConfirm = true ;

The issue I am having is that this does not seem to work for rich text fields.

Is there any way to make the dirty check work for rich text fields?

I found the JS file called pzpega_ui_doc_dirtyhandling which I think is what is handling the dirty checking.
In this JS file you can see some property types referenced, which I think is the only property types that is supported.

Any way around this?

Thanks

@AndersS1 I found the following information in a support ticket:

  • In 8.2.1, if we close the case screen without changing the text in RTE, dirty pop-up is not displayed.
  • In 8.6**.5**, if we try to close the case screen without changing the text in RTE, dirty pop-up is displayed.

This is because the RTE changes the text to include style to

  • elements automatically. When RTE is loaded, the content is automatically changed to add styles to elements, causing the form to tag as dirty.

    Details below: RTE is displayed with text from email history. In 8.2.1, if we close the case screen without changing the text in RTE, dirty pop-up is not displayed.

    From 8.6.5 onwards this behaviour of isDirty happening is observed because of the addition code added in the fireChangeEvent () in pzpega_ui_richtexteditor.js .

    I believe the fix must have been implemented OOTB after 8.6.3. The engineering team stated: 'Whenever any input is populated in RTE, if list element is present in the input it’s font-size is getting changed as per the inner span. Which is causing dirty popup even though client is populating data through data transform’

    (There are users who want to revert it back to the ‘old’ functionality and this has been logged under enhancement request, FDBK-93582)

    Your issue is logged against 8.6.3, so it might be worth you testing your scenario in the latest 8.6 version . The code change was added to fix style issues that were observed when content was copied from an external source (work document / website) and pasted in a RTE.

    ** Additional info added *******

    I can see that there have been further discussions with the engineering team . Essentially the Save does save the changes, but the UX is confusing since Edit Details screen is not where the end user is taken after clicking Save button on pyDirtyCheckConfirm

    Launch case manager, New>Process Flow>click Submit>type some text in the description field>click Actions>click Edit Details>click Save button>observe that you are not directed to being on the Edit Details screen (instead you are on the Dashboard- or somewhere else like Recently visited or the beginning of Assignments ) Not the Edit Details screen. Now launch the Screen Flow Case type>click Submit>enter some text>click Actions>Select Edit Details, Observe that you might not navigated anywhere, you just stay on the same screen or that you are taken somewhere else on the UI like Recently opened which is confusing UX.

    Conclusion:

    DirtyCheck modal Save button doesn’t work as expected (BUG-802403)

    Target release: Pega 8.7.6


    If you need further help with this, and if there is not further response here on the forum, then I suggest that you log a support incident for this on the MSP.

  • @MarijeSchillern

    We are updating Pega to 8.8 soon, so I guess I will wait until then and test behavior again.

    Thank you very much for the information!