Code Monkey home page Code Monkey logo

Comments (7)

wbamberg avatar wbamberg commented on May 21, 2024

Thanks for filing @ikarasz . This was also filed as mdn/kuma#6307 . Do you see this all the time or just intermittently?

from bob.

ikarasz avatar ikarasz commented on May 21, 2024

@wbamberg In the afternoon I noticed the issue on two different computers, now I cannot reproduce it on any of them.

from bob.

schalkneethling avatar schalkneethling commented on May 21, 2024

@wbamberg In the afternoon I noticed the issue on two different computers, now I cannot reproduce it on any of them.

😄 That is the fun ride we have also been having with this one. We also just did not have enough time to really dig into. it. It is tricky to figure out whether it is a Codemirror thing or just a race condition in our use of it.

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on May 21, 2024

For me it happens very rarely, like once in a month. I found out that:
Element with classes "CodeMirror-gutter CodeMirror-linenumbers" has width set to 1px instead of 29px, which makes grey bar invisible.
Element with class "CodeMirror-sizer" has marign-left set to 0px instead of 30px. It makes whole content be aligned to side of the window, instead of to the side of grey bar.
Elements with classes "CodeMirror-linenumber CodeMirror-gutter-elt" have width set to 1px instead of 21px, which doesn't have any significant impact.
Elements with class "CodeMirror-gutter-wrapper" have property left set to 0px instead of -30px. It makes line numbers be shown on top of text, instead of on the side of it.

image

I will create an issue in Code Mirror repo, maybe they will know what to do. #6953

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on May 21, 2024

I found out that element "editor" which is passed to CodeMirror, has offsetParent set to null and all getBoundingClientRect properties are 0 when this issue occurs. Same thing is true for that elements parent and for the body element. This is also true when editor is stripped of almost all JS code. Furthermore sometimes this is also true even after "load" event was fired by interactive example window.

On local env I was never able to reproduce this issue, but on MDN I figured out how to do it easily. I just open Array page and then open all of its methods in new tabs by using right click, usually 1 or 2 will have this problem.

@schalkneethling Any idea how is that possible?

from bob.

hamirmahal avatar hamirmahal commented on May 21, 2024

I had it happen to me just now, in a private browsing window on Windows 10. This is my browser information.

Microsoft Edge
Version 104.0.1293.54 (Official build) (64-bit)
There's no console error when this happens.

image

Refreshing the page seems to fix the problem.

from bob.

caugner avatar caugner commented on May 21, 2024

Closing in favor of #976.

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.