Cmd-Delete (macOS) does not trigger 'change' function in Text Editor

I've noticed that on the macOS, the Rich Text Editor's Function: "change", is NOT TRIGGERED when the standard macOS keyboard shortcut Command-Delete is used to delete an entire line of text.

Other keyboard shortcuts, e.g. Option-Delete (to delete a word) trigger the "change" Function as expected.

_______________________

macOS - 15.2

Essential Studio for EJ2 - 28.1.35


21 Replies

KP Kokila Poovendran Syncfusion Team January 2, 2025 11:38 AM UTC

Hi  Grant Symon,

 

 

Thank you for reaching out to us regarding the issue with the change event in the Rich Text Editor on macOS.

We have tested the reported behavior on macOS and found that the change event is triggered as expected when using the Command-Delete keyboard shortcut. You can find a sample illustrating the event functionality here:

 

Samplehttps://stackblitz.com/edit/1a4qmfle-antgremx?file=index.js,index.html

 

To assist you further, could you please share the following details?

  1. The complete code snippet used to render the Rich Text Editor component.
  2. Steps to replicate the issue, along with a video reference showcasing the behavior.

Providing these details will help us investigate the issue thoroughly and offer a more precise solution.

We look forward to your response and are committed to resolving this for you promptly.

 

 

 

Image_9739_1735817470884

 




GS Grant Symon January 5, 2025 01:38 PM UTC

Hi Kokila Poovendran,

thank you for your reply.

That's very interesting to see. I'm using Syncfusion RTE inside a FileMaker 'web viewer' which is not actually a browser. I'm on Mac and so the web viewer is running webkit.

In this video I'm using a very simple version of my code. On the right-hand side, you can see the Syncfusion Rich Text Editor and below it you can see the results of the 'change' triggered script. It sets the Plain Text, a temporary HTML and when the 'Save button' is pressed, it saves the HTML temp to the FileMaker record's HTML field.


In the video, I'm showing what happens when:

1/ The Delete key is used on its own.

2/ Option-Delete is used (on Mac, this is a standard keyboard shortcut, which deletes whole words to the left of the cursor.

3/ Command-Delete, which deletes everything in the current line of text to the left of the cursor.


Both Option-Delete and Command-Delete are long standing Mac shortcuts.

Regards,

Grant


Attachment: GSymonvideoGrabSyncfusionCmdDeleteC_49bec27b.zip


HR Harish Raja Syncfusion Team January 20, 2025 07:30 AM UTC

Hi Grant Symon,


We have considered the reported issue "Cmd-Delete (macOS) does not trigger 'change' function in Text Editor" as a bug from our end and the fix for the issue will be included with our upcoming patch release on the first week of February 2025.



Now you can track the status of the reported issue through the feedback below,


https://www.syncfusion.com/feedback/64756/cmd-delete-macos-does-not-trigger-change-function-in-text-editor


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Harish Raja.




GS Grant Symon January 20, 2025 08:40 AM UTC

Hi Harish Raja,

thank you for the reply.  This is really good news and I'm looking forward to the fix.  Not everyone uses the keyboard so much, but for those that do, it's very hard to change. 🙂

Regards,

Grant




KP Kokila Poovendran Syncfusion Team February 4, 2025 01:01 PM UTC

Hi Grant Symon


Query: 
Cmd-Delete (macOS) does not trigger 'change' function in Text Editor


Feedback:  https://www.syncfusion.com/feedback/64756/cmd-delete-macos-does-not-trigger-change-function-in-text-editor


We have included the fix for the issue "Cmd-Delete (macOS) does not trigger 'change' function in Text Editor" with our package version 28.2.4. So, can you please upgrade your package to the latest to resolve the issue from your end?


Release notes:  https://ej2.syncfusion.com/documentation/release-notes/28.2.4?type=all#richtexteditor


Root cause: Cmd + Backspace does not trigger the keyup event on Mac, and since the change event is invoked on keyup.


Regards,

Kokila Poovendran.



GS Grant Symon February 4, 2025 02:21 PM UTC

Hi Kokila,

Thank you very much for the reply and for working on this.

Unfortunately, it doesn't quite fix it for me.  I attach a video-grab to show what is happening.  The action is not being triggered by Cmd-Delete ... however ... the Delete-Key, on it's own triggers the action.  NB... there is NO SPACE to the left of the cursor.  It is at zero-point of characters (the start of an empty document) and yet the Delete-Key triggers the action.  So, I'm guessing that you're half way there. 😊

Kind regards,

Grant


Attachment: GSymonvideoGrabSyncfusionCmdDeleteD_5bbdeeef.zip


KP Kokila Poovendran Syncfusion Team February 6, 2025 07:40 AM UTC

Hi Grant Symon,


We sincerely apologize for the inconvenience caused. We have validated the issue and confirmed that the fix has not yet been updated in the provided package version.

Please ignore the previous release update. The fix for this issue will be included in our upcoming patch release, which is scheduled for mid-February. We appreciate your patience until then.



GS Grant Symon February 6, 2025 09:01 AM UTC

Hi Kokila.

Ahh... that's good news.  I tend to keep up to date, so no worries. 🙂

Thank you for the update.

Grant



GS Grant Symon February 12, 2025 06:55 PM UTC

👍😊👍

Thank you Syncfusion team.



GS Grant Symon February 17, 2025 03:44 PM UTC

I'm just coming back to this ... because today I noticed that Cmd-X (cut) on macOS does not trigger 'change' either.



KP Kokila Poovendran Syncfusion Team February 18, 2025 05:34 AM UTC

Hi Grant Symon,


Query: Cmd-Delete (macOS) does not trigger 'change' function in Text Editor


Feedback:  https://www.syncfusion.com/feedback/64756/cmd-delete-macos-does-not-trigger-change-function-in-text-editor


We have included the fix for the issue "Cmd-Delete (macOS) does not trigger 'change' function in Text Editor" with our package version 28.2.5. So, can you please upgrade your package to the latest to resolve the issue from your end?


Release notes:  https://ej2.syncfusion.com/documentation/release-notes/28.2.4?type=all#richtexteditor


Root cause: Cmd + Backspace does not trigger the keyup event on Mac, and since the change event is invoked on keyup.


Query 2: Cmd-X (cut) on macOS does not trigger 'change'


We tested this scenario on macOS, and the Cmd-X (cut) shortcut correctly triggers the change event when text is selected and cut.

To investigate further, could you please provide the exact steps to replicate the issue on our end? If possible, sharing a video reference would be helpful for us to analyze and provide a precise solution.

Looking forward to your response!





GS Grant Symon February 18, 2025 02:06 PM UTC

Hi Kokila,

here's a video-grab of what I'm seeing:


Attachment: GSymonvideoGrabSyncfusionCmdX_800c2f02.zip


KP Kokila Poovendran Syncfusion Team February 19, 2025 10:10 AM UTC

Hi Grant Symon,


We have investigated the issue based on the video you shared, but we are still unable to replicate the problem on our end. Please check the video we have provided below, where performing the Cmd-X operation correctly triggers the change event when text is selected.

To assist you more effectively, could you please verify if the same issue occurs in the sample we have shared below? If the issue is reproducible in the provided sample, kindly share a video reference demonstrating the behavior, and we will investigate it further.

We appreciate your cooperation and look forward to your response.


Samplehttps://stackblitz.com/edit/1a4qmfle-fstartsj?file=index.js,index.html









GS Grant Symon February 19, 2025 10:55 AM UTC

Hi Kokila

I can confirm that Cmd-X is working for me in Safari on the StackBlitz demo, however, it is not working in my file in FileMaker Pro, which uses a Webkit 'web-viewer'.  This may be down to FileMaker Pro, which is NOT a web-browser.

HOWEVER!!

It never occurred to me to try before ... but Cntrl-X works in FileMaker!!

Question.. is there any way that I can have the Rich Text Editor use the default macOS keyboard-shortcuts, instead of the Windows ones?




BT Bhuvaneshwari Thirunavukarasu Syncfusion Team March 20, 2025 12:40 PM UTC

Hi Grant Symon,

Thank you for your patience.

We have installed the FileMaker Pro application on macOS and loaded the Syncfusion demo pages within it. Our testing confirms that Cmd + X works as expected with a physical keyboard
However, based on the screenshot you previously shared, it appears that you are using a virtual keyboard. We tested the same scenario and found that Cmd + X does not function correctly in this case. Additionally, we verified this behavior in a contenteditable="true" <div>, and the same issue occurs.

We have attached a screen recording of our findings for your reference.
Let us know if you need further clarification.

Thanks,
Bhuvaneshwari T


GS Grant Symon March 24, 2025 01:35 PM UTC

Wow!  Well I wasn't expecting you to find a Mac and a copy of FileMaker to try it out!!  Thank you.😊

.

NB  • I am using my Mac's built-in keyboard for ALL videos that I've made for the SyncF forums.

The keyboard window that you see in my videos, is the default macOS 'Accessibility' keyboard.  It shows what keys are being pressed.


_______________________________________________


Apologies for the length of this video, but I haven't been able to fully understand what is happening and there is actually some behaviour that I haven't managed to effect in this video, but which I have seen multiple times.  That said, this video shows what I've found to be the essential 'base' of what is happening and I haven't edited it down, because it may be useful to see when nothing happens, as well as when something happens.

(I strongly advise watching at ~half speed (slow motion).  Yes, it takes twice as long... but you'll probably need to watch it fewer times. 😀)


5 Points:


1/ Clicking the web-viewer...  outside of the RTE's area  ...triggers Change.  This is effective *sometimes* before entering the RTE area and always when exiting the RTE area.


2/ Cmd-Z *sometimes* triggers Change.  Sometimes Cmd-Z can be used twice.  The first time does nothing, but the second time triggers Change.


3/ If Cmd-A, then Cmd-X fails to execute Change... the DELETE key effects Change.  This is strange behaviour, because Cmd-A should ensure that ALL text is selected and therefore, the Delete Key should not have anything to remove.  It should already be empty.


4/ The 'Save' button runs a simple FileMaker script, which saves the 'Temporary HTML' to the 'Saved HTML', which is the HTML that is referenced when the Record is first loaded.


5/ Cntrl-X *always works correctly*


_______________________________________________


( I'm a low-level amateur ... but one aspect that I have noticed, as odd behaviour (and that I've had a discussion about here on the forums) and that it occurs to me *may* be having an affect on what is happening, is the RTE's Borders.  There are 2 Borders on the RTE.  You will see in the RTE HTML to the left, that there are 2 code clips, that are disabled.  I have disabled them, *specifically* so that you can see the area of the RTE and also the area of the Web-Viewer that is *outside* of the RTE, but that also *encompasses* the RTE.

If I disable the top code clip, the Border of the RTE becomes *visibly* thinner.  If I then disable the 'class' one (lower down) this 2nd Border disappears too.  Could there be something going on, which affects whether the RTE is considered active or not?? )


As an aside:

If it would be of any use to you, I'm very happy to send you a simplified version of my FileMaker file, so that you can try it out yourselves and which may facilitate your understanding of what's going on.  The window that you see in my videos, is purely a 'development' window (although part of my app) which I use for the RTE and other Web-Viewer related development work.


Regards,


Grant


Attachment: GSymonvideoGrabSyncfusionCmdXB_942c2621.zip



BT Bhuvaneshwari Thirunavukarasu Syncfusion Team April 4, 2025 06:41 AM UTC

Hi Grant Symon,
 
Thank you for your patience.
 
When you click outside the Rich Text Editor (RTE) area, the change event is triggered because the editor is losing focus (i.e., focusing out). This is expected behavior in the Syncfusion RTE component, as it detects changes when the focus shifts away and content has been modified.
Additionally, the RTE uses the saveInterval property to monitor content changes at a specified interval (in milliseconds). If the content has changed since the last save interval, the change event is triggered automatically—even without explicit focus out.
Setting saveInterval: 1 will resolve all inconsistencies by ensuring that changes are detected immediately:
  • Clicking outside RTE: Change event triggers instantly upon losing focus.
  • Cmd-Z (Undo) inconsistency: Every undo operation is recognized immediately.
  • Save button ensuring the latest content is saved: The change event fires immediately, preventing any missed updates.
 
import { RichTextEditor, Toolbar, Link, Image, HtmlEditor, QuickToolbar, Table } from '@syncfusion/ej2-richtexteditor';
RichTextEditor.Inject(Toolbar, Link, Image, HtmlEditor, QuickToolbar, Table);
 
let editorObj: RichTextEditor = new RichTextEditor({
    saveInterval: 500 // Checks for changes every 500ms
});
editorObj.appendTo('#editor');
 
This adjustment ensures immediate and consistent change detection across all scenarios.
 
Thanks,
Bhuvaneshwari T


GS Grant Symon April 4, 2025 09:26 AM UTC

Thank you Bhuvaneshwari,

I can confirm that 500ms fixes the problem.

Also thank you for the further explanations, which are useful for my general understanding.

Best wishes,

Grant



BT Bhuvaneshwari Thirunavukarasu Syncfusion Team April 7, 2025 04:17 AM UTC

Hi Grant Symon,

You're very welcome.

We're glad to hear that the 500ms adjustment resolved the issue.
If you have any more questions or need help with anything else, feel free to reach out anytime.

Best regards,
Bhuvaneshwari



GS Grant Symon April 7, 2025 11:00 AM UTC

Thanks again Bhuvaneshwari and I just thought I'd add a thank you to you and your team for the recent and ongoing improvements/fixes to the Rich Text Editor.  Lots of little fixes make a BIG difference. 😊



BT Bhuvaneshwari Thirunavukarasu Syncfusion Team April 8, 2025 08:03 AM UTC

Hi Grant Symon,

Thank you so much for your kind words!

Please don’t hesitate to reach out if there’s anything else we can help you with.

Regards,

Bhuvaneshwari T


Loader.
Up arrow icon