Comments (7)
Was able to get repro with 3/5 rate.
- Open page https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol ,
- find `Symbol.isConcatSpreadable
- Select and click "Open link in new tab"
- Observe
Google Chrome Version 103.0.5060.134 (Official Build) (x86_64)
from bob.
I've also hit it in the past, and there are duplicate issues: mdn/content#13531
This isn't reproduced consistently in my browser—in fact, probably once every 100 visits—and usually works after a refresh. But I have a feeling this has something to do with wrong hydration order. @mdn/core-dev it's probably a pain but could you investigate?
from bob.
Managed to temporarily reproduce it in Chrome but after navigating the site for a while it no longer occurs.
from bob.
Not a consistent repro. Navigation using links inside the page - persists the issue. Full Refresh (F5) of the page - clears the issue.
When issue occurs each line of code rendered as:
// each line of code
<div style="position: relative;">
<div class="CodeMirror-gutter-wrapper" aria-hidden="true" contenteditable="false" style="left: 0px;">
<div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 1px;">2</div>
</div>
<pre class=" CodeMirror-line " role="presentation">
<span role="presentation" style="padding-right: 0.1px;">
<span class="cm-comment">// expected output: 23</span>
</span>
</pre>
</div>
// left section containing line numbers
<div class="CodeMirror-gutters" style="height: 258px;">
<div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 1px;">
</div>
</div>
With proper render:
// each line of code
<div style="position: relative;">
<div class="CodeMirror-gutter-wrapper" aria-hidden="true" contenteditable="false" style="left: -30px;">
<div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div>
</div>
<pre class=" CodeMirror-line " role="presentation">
<span role="presentation" style="padding-right: 0.1px;">
<span class="cm-comment">// expected output: 23</span>
</span>
</pre>
</div>
// left section containing line numbers
<div class="CodeMirror-gutters" style="height: 257px;">
<div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;">
</div>
</div>
Main differences:
left: 0px
vs left: -30px
width: 1px
vs width: 21px
width: 1px;
vs width:29px;
Looks like Code related component has an issue with maintaining showLineNumbers state, and sometimes got into state when numbers are shown but component set all styling as they are hidden.
from bob.
FWIW @NiedziolkaMichal has reported the issue upstream: codemirror/codemirror5#6953
from bob.
@caugner Yes, but issue is with our implementation of code mirror. Version 6 was released quite recently which I think wouldn't have this problem(we use 5.65.8), but its API is significantly different. I could work on upgrading it, but currently I have 6 PRs in BOB waiting for a review, so its likely that I would be wasting my time.
from bob.
Duplicate of #976.
from bob.
Related Issues (20)
- Wrap localStorage read/write access in try-catch block
- bug: using `new Function` in interactive examples seems to not work as expected HOT 2
- Color of css ID selector HOT 1
- poor code color contrast with css function names in dark mode HOT 3
- OUTPUT label hiding content HOT 4
- pr-rebase-needed fails, requiring repoToken HOT 2
- Migrate to CodeMirror v6 HOT 4
- Dark mode: Some keywords don't have enough contrast in some interactive examples HOT 3
- Poor contrast ratio on dark mode with interactive example HOT 1
- Try It code coloring inaccessible in dark mode for CSS functions HOT 2
- Maturing Bob
- The output label is covering the output content HOT 2
- Testing interactive examples with new BOB changes HOT 10
- Is auto-deployment of new/updated example pages broken? HOT 3
- Interactive examples: scrollbars break dark theme HOT 1
- interactive examples: line numbers and code overlaps HOT 14
- HTML examples: sometimes line counter collapses HOT 7
- Bug: Line number in code snippets doesn't stay on the left side when scrolling HOT 11
- Interactive examples 2-column layout is not compatible with mobile HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bob.