Coder Social home page Coder Social logo

Comments (4)

marijnh avatar marijnh commented on May 16, 2024

Hi Chiel,

Are you working with the current git HEAD? Commit ef83a91 fixed something related to this, and if I now open one of the demo pages, and set (from the script console) the height of the editor, the gutter is indeed off, but calling .refresh() does properly fix this.

Best,
Marijn

from codemirror5.

chiel avatar chiel commented on May 16, 2024

Hi Marijn,

I made a point to pull in the latest version of CodeMirror2 before "whining" about it here, so yep, I do have that fix.

If .refresh() is supposed to work as I thought, then the only thing I can think of, is the fact that I changed the style of the .CodeMirror class by using height: 100%;, since it's inside of a wrapper, that resizes with the rest of the layout.

This shouldn't really cause any issues as far as I know, but hey, it might be contributing? In what way do you assess the height of the codemirror instance? I made a little hack for this, for now, but it's hardly ideal. Basically every time the window (which means also the editor-wrapper) I set the height of the gutter to "", and the min-height to 100%. That way it's always at least 100% of the codemirror instance, yet it'll still stretch past this.

Best,
Chiel

from codemirror5.

marijnh avatar marijnh commented on May 16, 2024

Someone in the google group provided me with a test case for this. db0a7e6 should solve it. If it doesn't reopen.

from codemirror5.

chiel avatar chiel commented on May 16, 2024

Awesome, this does the trick perfectly! Thanks a lot for being so fast with all this. CodeMirror is a delight to work with. At the moment it seems to be really slow in Chrome, though. But I'll make another ticket about that if it remains an issue.

Cheers!

from codemirror5.

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.