Skip to content

HTMLEditor: Fix nested numbered list counter resetting (T1320286)#32582

Open
r-farkhutdinov wants to merge 3 commits intoDevExpress:26_1from
r-farkhutdinov:26_1_T1320286
Open

HTMLEditor: Fix nested numbered list counter resetting (T1320286)#32582
r-farkhutdinov wants to merge 3 commits intoDevExpress:26_1from
r-farkhutdinov:26_1_T1320286

Conversation

@r-farkhutdinov
Copy link
Contributor

No description provided.

@r-farkhutdinov r-farkhutdinov self-assigned this Feb 16, 2026
@r-farkhutdinov r-farkhutdinov marked this pull request as ready for review February 16, 2026 14:21
@r-farkhutdinov r-farkhutdinov requested a review from a team as a code owner February 16, 2026 14:21
Copilot AI review requested due to automatic review settings February 16, 2026 14:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes nested numbered list counter resetting in the HTMLEditor component (T1320286). The issue was that nested ordered lists were incorrectly resetting their parent list's counter, causing numbering sequences to restart unexpectedly.

Changes:

  • Added new SCSS function add-counter-set to generate counter-set declarations for all indent levels
  • Moved counter-reset from li[data-list="ordered"] to the ol element to initialize counters at the list level
  • Added counter-set property to base-level ordered list items (without indent classes) to properly reset nested counters

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

}

li[data-list="ordered"]:not([class*="ql-indent"]) {
counter-set: add-counter-set($max-indent);
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS counter-set property has limited browser support, particularly in older Safari versions (requires Safari 17.2+, December 2023). While the browserslist configuration targets the last 2 versions of major browsers, you should verify that this CSS property is compatible with your target browsers. Consider testing this change across different browsers, especially Safari, to ensure the nested list counters display correctly. If compatibility issues arise, you may need to implement a fallback or polyfill approach.

Suggested change
counter-set: add-counter-set($max-indent);
counter-reset: add-counter-set($max-indent);

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 16, 2026 15:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant