Git Product home page Git Product logo

Comments (14)

wbamberg avatar wbamberg commented on July 23, 2024

What information was incorrect, unhelpful, or incomplete?

the demo is altered/bug

What did you expect to see?

a structured explanation

Could you explain in a bit more detail what the problem is? I don't know what "the demo is altered/bug" means.

from bob.

cjarmada avatar cjarmada commented on July 23, 2024

from bob.

hamishwillee avatar hamishwillee commented on July 23, 2024

Hi @cjarmada

Perhaps you could put a screenshot highlighting the bit of the text that concerns you?
At the moment it is impossible to fix this because it isn't clear where you are seeing this mixing, which means we have no chance of working out why you think it is a problem.

from bob.

wbamberg avatar wbamberg commented on July 23, 2024

I can't find the report now, but I wonder if this is an intermittent issue we see in interactive examples where the line numbers overlap the first couple of characters of the code. It turns out I can reproduce this in Chrome if I:

Screen Shot 2022-05-02 at 4 48 14 PM

@cjarmada , is this what you are seeing?

This has been reported before but was closed because noone could figure out what was causing it.

But if this is your problem I think we should transfer this issue to Yari, so we can have another go at fixing it!

from bob.

wbamberg avatar wbamberg commented on July 23, 2024

No wonder I couldn't find it, it was from Kuma days: mdn/kuma#6310.

from bob.

cjarmada avatar cjarmada commented on July 23, 2024

from bob.

wbamberg avatar wbamberg commented on July 23, 2024

Great! Since this is a platform issue, I'm transferring it to mdn/yari.

from bob.

cjarmada avatar cjarmada commented on July 23, 2024

Screenshot (83)

And if I refresh the page, it's just fixed.

Screenshot (85)

from bob.

caugner avatar caugner commented on July 23, 2024

Unfortunately I cannot reproduce the issue following those steps with Chrome 101 on Mac OS.

@cjarmada @wbamberg

  • What Chrome version and operating system are you using?
  • Could you please provide a screen recording (video) starting with a blank page (about:blank) so that we can see exactly what steps lead to the issue?

from bob.

caugner avatar caugner commented on July 23, 2024

Duplicate of #742.

from bob.

wbamberg avatar wbamberg commented on July 23, 2024

I'm running macOS Big Sur, and see the problem with Chrome 100 (but since this has been an issue for years, it's unlikely to be a problem with a specific Chrome version).

Screen recording:

overlaps

from bob.

caugner avatar caugner commented on July 23, 2024

Thanks @wbamberg! I was able to reproduce it now, but only after disabling MDN Offline.

It looks like a CodeMirror bug, which doesn't set the width of the div.CodeMirror-linenumber:

image

And there are indeed two corresponding upstream bugs:

from bob.

schockocraft avatar schockocraft commented on July 23, 2024

I am using this script in Tampermonkey now, to fix the issue on my end, and thought it might be worth suggesting that you'll implement the same workaround for everyone until the upstream issues have been resolved:

gist.github.com/schockocraft/mdn-fix-js-code-examples.js

If you don't wanna do this, i hope anyone who is annoyed by it will find the link here to use it for themselfes :D

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on July 23, 2024

This issue has been fixed, after updating CodeMirror to version 6. Thank you for reporting it.

from bob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.