Code Monkey home page Code Monkey logo

Comments (8)

marijnh avatar marijnh commented on June 11, 2024

It looks like there is already code that either sets a large width or turns of wrapping.

    // The textarea is kept positioned near the cursor to prevent the
    // fact that it'll be scrolled into view on input from scrolling
    // our fake cursor out of view. On webkit, when wrap=off, paste is
    // very slow. So make the area wide instead.
    if (webkit) { te.style.width = "1000px"; }
    else { te.setAttribute("wrap", "off"); }

Yet the textarea in your screenshot seems to have neither. Why?

from codemirror5.

hlf20010508 avatar hlf20010508 commented on June 11, 2024

Oh maybe that's because the editor used old version of codemirror.

Thanks for your instruction.

from codemirror5.

hlf20010508 avatar hlf20010508 commented on June 11, 2024

Oh maybe that's because the editor used old version of codemirror.

Thanks for your instruction.

Oh no, I've checked the version, the editor used 5.63.1 which has the code you mentioned too.

from codemirror5.

hlf20010508 avatar hlf20010508 commented on June 11, 2024

I don't know if it's because of iPadOS 16. Both Safari and Firefox has this problem.

I can provide the editor and my project if you need.

from codemirror5.

marijnh avatar marijnh commented on June 11, 2024

The code I pasted should run for every hidden textarea created by the editor. You'll have to debug how, in your case, it ends up creating a textarea with neither a width nor a wrap attribute.

from codemirror5.

hlf20010508 avatar hlf20010508 commented on June 11, 2024

webkit is true, so the problem is why width is not 1000px.

I'll keep on trying.

from codemirror5.

hlf20010508 avatar hlf20010508 commented on June 11, 2024

Oh, here, in TextareaInput.js, it set ios device to 0px.

from codemirror5.

hlf20010508 avatar hlf20010508 commented on June 11, 2024

And I've tried setting width to 1000px, it works fine too.

So both width: 1000px; and white-space: nowrap; works fine.

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.