Use formUpdated event instead of change event

Created on 6 August 2024, 8 months ago

Problem/Motivation

Hi, this module uses a subscription to the change event to determine if the form has been edited, but some specific updates do not trigger this event, so the core has its own formUpdated event for form updates.

One example where this causes a problem is editing in CKEditor5, but switching to the formUpdated event will solve the problem.

This will also remove the iteration of all CKEditor4 instances.
And will solve the problem when one of these instances calls a dialog, although it is not in a form.

Steps to reproduce

  1. Create a form with CKEditor5.
  2. Include modified-form-alert.js to the form.
  3. Enter something in CKEditor5.
  4. Try to close the browser tab, it will close successfully without warning.

Proposed resolution

Subscribe to formUpdated event instead of chage in modified-form-alert.js

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Needs review

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024