Skip to content

Conversation

Serranosoft
Copy link

This PR addresses a cursor placement issue in checkbox lists

  • Previously, setCollapse() was called on the <ol> node. This works correctly in Chrome, Safari, and all mobile WebViews, but the online example does not behave correctly in Firefox desktop and the cursor is placed incorrectly after the checkbox.

  • This change ensures that setCollapse() points to the <li> node containing the checkbox, which aligns with the correct HTML semantics and guarantees consistent behavior across all browsers, including Firefox desktop.

Notes

  • No changes affect Chrome, Safari, or mobile WebViews; they continue to function as before.

  • This fix is only required for the Firefox desktop online example due to its stricter handling of contenteditable and non-editable elements.

  • Improves cross-browser consistency for checkbox lists in the online example.

  • Does not affect other parts of the editor where setCollapse is used.

Changes

// Previously
foNode = node.firstChild; // <ol>

// Fixed
foNode = node.firstChild.firstChild; // <li> containing the checkbox
setCollapse(foNode);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant