medium-editor
medium-editor copied to clipboard
Exception when calling checkContentChanged on editor which is not in focus
Description
When clicking button, its event handler calls editor.checkContentChanged(). Error is thrown.
Uncaught TypeError: target.getAttribute is not a function
at Events.updateInput (medium-editor.js:2921)
at MediumEditor.checkContentChanged (medium-editor.js:7771)
at HTMLButtonElement.<anonymous> (pen.js:3)
Steps to reproduce
- Trigger
checkContentChanged
when target editor is not focused.
Expected behavior: Trigger update check
Actual behavior: Exception is being thrown
Link to an example: https://codepen.io/laacz/pen/JxmjZG
Versions
- medium-editor: 5.23.3
- browser: Chrome win 71.0.3578.98
- OS: Windows 10
Hi @laacz! Did you find a fix for this issue?
@Micromagicman, I worked around with not using checkContentChanged.
Hi @laacz , could you please share more details on your workaround?
@lucaprevitali Negative. It was so long ago that I really don't remember anymore.