Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header/paragraph doesn't reset list numbering in Firefox #3272

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

luin
Copy link
Member

@luin luin commented Jan 13, 2021

Reproducible steps:

  1. Add some list items and a paragraph like the attached screenshot.

CleanShot 2021-01-13 at 22 42 13@2x

2. The second list should start with 1 but in Firefox it starts with 3.

The reason is Firefox changes its counter behavior recently: https://bugzilla.mozilla.org/show_bug.cgi?id=1679712. We are using counter-reset to set the numbering to 0. However, in Firefox, it actually creates a new counter instead of reset the existing one.

To fix, the PR uses counter-set, and if it's not supported fallback to counter-reset.

Browser behaviors for reference:

Chrome Firefox Safari
counter-reset CSS level 2 CSS level 3 CSS level 2
counter-set

Test plan:
Make sure the numbering of the example above looks correct in all browsers.

@luin luin marked this pull request as ready for review January 13, 2021 15:15
@luin luin requested a review from jhchen January 13, 2021 15:15
@jhchen jhchen merged commit eeb976e into slab:develop Jan 22, 2021
DokaRus pushed a commit to DokaRus/devextreme-quill that referenced this pull request Mar 25, 2021
Header/paragraph doesn't reset list numbering in Firefox

(cherry picked from commit eeb976e)
DokaRus added a commit to DevExpress/devextreme-quill that referenced this pull request Mar 26, 2021
* Merge pull request slab#3223 from luin/ignore-nested-quill-mutations

Ignore mutations happens in nested Quill instance

(cherry picked from commit 8ce3ee3)

* Merge pull request slab#3272 from luin/firefox-bullet

Header/paragraph doesn't reset list numbering in Firefox

(cherry picked from commit eeb976e)

* allow list completion on lists and headers

(cherry picked from commit a6911aa)

* fix arrow keying past list item

- in chrome it take two left arrows to go to prev list item
- in firefox ctrl+left does not work

(cherry picked from commit 9d16aa5)

* fix breaking list items

Without this a string with no space on a line will cause the break to
occur after the bullet but with it a string with spaces may not break at
the space. The latter is much more common and also the choice Paper
makes

(cherry picked from commit 232b6f4)

* Merge branch 'fix-cut-format'

* Merge pull request slab#3293 from quilljs/firefox-checkbox

Fix checkbox not checkable on Firefox

(cherry picked from commit 1f0530a)

Co-authored-by: Jason Chen <jhchen7@gmail.com>
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.

2 participants