Issue metadata
Sign in to add a comment
|
counter has incorrect value
Reported by
conall.c...@kneat.com,
Mar 15 2018
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3370.0 Safari/537.36
Steps to reproduce the problem:
1. create an ul with a nested ul in one of the li.
2. add some css to show a counter before the li
<style>
ul {
counter-reset: section;
}
li::before {
counter-increment: section;
content: counters(section, ".") " ";
}
</style>
<ul>
<li>one
<ul class="ul1">
<li>
one one
</li>
</ul>
</li>
<li>
two
</li>
</ul>
3. at this stage we have an un-ordered list with the counters displayed before
4. change the display of the inner ul to none
5. change the display of the inner ul to back to block
6. the counter for the last li has the incorrect value (1.2 not 2)
What is the expected behavior?
the counter should not change after changing the display of an element
What went wrong?
the counter for elements below the element that we changed the display of have the wrong counter value
Did this work before? Yes 64
Does this work in other browsers? Yes
Chrome version: 67.0.3370.0 Channel: n/a
OS Version: 10.0
Flash Version:
,
Mar 16 2018
,
Mar 16 2018
Thanks for filing the issue! Checked the issue on reported chrome version 67.0.3370.0 using Windows 10 with the below mentioned steps. 1. Launched Chrome 2. Downloaded file "ul_counter.html" and opened it in a new tab. We didn't observe any option to change the display of the inner ul to none and other steps to do as mentioned in comment#0. Attaching the result we have seen on opening the file attached in c#0. @Reporter: Could you please have a look at the screen shot provided and let us know if we have missed anything in the process of reproducing the issue. Any further inputs from your end may help us in triaging the issue in a better way.
,
Mar 16 2018
hi, no that is the issue. the <li>two</li> should have the counter value 2 :before it. thanks
,
Mar 20 2018
Example URL: https://jsfiddle.net/8zhj7ztp/2/ Steps to reproduce: 1. visit https://jsfiddle.net/8zhj7ztp/2/ 2. notice `<li>two</li>` has the counter value "2" 3. press the button, this changes the display of the `<ul class="ul1" />` to 'none' 4. press the button, this changes the display of the `<ul class="ul1" />` to 'block' 5. notice `<li>two</li>` has the counter value "1.2" What is the expected behavior? the counter on `<li>two</li>` should not change when elements in a sibling node change
,
Mar 27 2018
Same problem here, on ubuntu. https://stackoverflow.com/questions/49516407/css-nested-counters-with-dinamic-child-element Version 65.0.3325.162 (Official Build) (64-bit)
,
May 31 2018
this is still an issue and has a more recent Stack Overflow question - https://stackoverflow.com/questions/50411755/css-counter-is-giving-wrong-numbering-in-chrome-with-slidetoggle
,
Jun 21 2018
If you want to see this in action, here is another example: https://360.articulate.com/review/content/62871dd6-c8fc-4e3b-ba07-5bf23bf3a57a/review Collapse and open various headers in the outline and you'll see how the outlining goes all to heck.
,
Jun 25 2018
If this bug is the same as 849107 then it appears fixed in Chrome version 69.0.3466.0 https://bugs.chromium.org/p/chromium/issues/detail?id=849107
,
Jul 3
Reproduces on Stable 67.0.3396.87, but not on Canary 69.0.3479.0. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by viswa.karala@chromium.org
, Mar 15 2018