Exception when calling checkContentChanged on editor which is not in focus
Author: laaczCreated Feb 14, 2019Updated Feb 8, 2024
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
checkContentChangedwhen 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
Source: yabwe/medium-editor