Git Product home page Git Product logo

Comments (5)

thehogfather avatar thehogfather commented on July 29, 2024

I cannot reproduce the error with that file. I'm guessing it is being thrown from line 105?

from brackets-code-folding.

MiguelCastillo avatar MiguelCastillo commented on July 29, 2024

Yeah, my bad. I should provided you with a stack trace. Quick assumption, adding a gutter marker failed and then you try access it anyway.

Uncaught TypeError: Cannot read property 'textContent' of undefined main.js:105
_toggleLineMarker main.js:105
(anonymous function) main.js:126
_decorateGutters main.js:125
_handleScroll main.js:189
f.event.dispatch jquery-1.7.min.js:3
f.event.add.h.handle.i jquery-1.7.min.js:3
f.event.trigger jquery-1.7.min.js:3
f.fn.extend.triggerHandler jquery-1.7.min.js:3
Editor._installEditorListeners._codeMirror.on.self._focused Editor.js:655
signal codemirror.js:5093
(anonymous function)

from brackets-code-folding.

MiguelCastillo avatar MiguelCastillo commented on July 29, 2024

Quick debug and lInfo.gutterMarkers is undefined when the issue occurs... You might want to keep track of your markers yourself and reset them everytime a new document is opened

from brackets-code-folding.

thehogfather avatar thehogfather commented on July 29, 2024

Cool thanks.
Although I guess lInfo.gutterMarkers["code-folding-gutter"] must be undefined since there is a condition in the preceding line that checks that lInfo.gutterMarkers is defined (line 104)...?

from brackets-code-folding.

MiguelCastillo avatar MiguelCastillo commented on July 29, 2024

I am using a mousewheel and the issue seems to occur when scrolling kinda fast. If you scroll slow enough, the issue won't happen. So, I am thinking that you are trying to access gutter value before they are created by CodeMirror.

Yeah, you should keep track of you marker manually

from brackets-code-folding.

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.