tinymce / tinymce-angular

Official TinyMCE Angular Component
MIT License
324 stars 93 forks source link

Deleting empty row doesn't trigger (ngModelChange) #211

Closed YusufIpek closed 3 years ago

YusufIpek commented 3 years ago

What is the current behavior? When deleting an empty row or selecting multiple lines and deleting them doesn't trigger (ngModelChange).

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar. I created an example on fiddle, it is in vanilla javascript, but it should do the work, because if that works I can also add the event in the setup of tinymce in angular. Please have a look https://fiddle.tiny.cloud/22haab/1

What is the expected behavior? I expect that the input event or change event is going to be fired, but it doesn't happen.

Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular? I am using tinymce 5.4.2

jscasca commented 3 years ago

Hey @YusufIpek

Deleting a row should trigger a change event, you can add editor.on('change', (e) => {console.log('change');}); to your fiddle to check it out. Try using 5.6.2 which is the latest in tinymce5-cloud-stable just in case.

Let me know if that works?

YusufIpek commented 3 years ago

@jscasca

Thank you for your reply,

it is not working, I am adding rows with enter and when deleting the empty rows the change event is not triggered. I also tried 5.6.2, but unfortunately it doesn't work.

jscasca commented 3 years ago

Oh, I had 'table rows' in mind. Yeah I see that behaviour. Can you try with keyup in the meantime?

I'm not sure why the input event is not triggering so I will have to dig around a bit more

YusufIpek commented 3 years ago

@jscasca

Thank you.

jscasca commented 3 years ago

I'm not sure when is that going to get fixed in the editor, unfortunately. In the meantime, having keyup in your model events might be the simplest workaround. I'll have to close this ticket since there is nothing much we can do at the wrapper level here :(