Updated tasklist style and functionality for cross-browser use

- Updated styles to better align checkboxes within page content.
- Updated functionality to use a cross-compatible property on checkbox
  click within the editor.
This commit is contained in:
Dan Brown
2022-03-23 11:51:19 +00:00
parent c5aad29c72
commit 883e18f7c4
2 changed files with 7 additions and 1 deletions

View File

@ -84,9 +84,10 @@ function register(editor, url) {
// Handle checkbox click in editor
editor.on('click', function(event) {
const clickedEl = event.originalTarget;
const clickedEl = event.target;
if (clickedEl.nodeName === 'LI' && clickedEl.classList.contains('task-list-item')) {
handleTaskListItemClick(event, clickedEl, editor);
event.preventDefault();
}
});
}