GithubHelp home page GithubHelp logo

Comments (5)

Nedomas avatar Nedomas commented on May 3, 2024 2

I don't think this is related to deleting. I get the same problem if I start entering text on a previously empty line, but one that has content in lines after it.

For example, enter this into the textarea:

1
2

4

Then click on the missing line (where 3 would be) and try to start typing - it won't work. This happens both with controlled and uncontrolled textareas.

from react.

blghns avatar blghns commented on May 3, 2024 1

@iansan5653 Nice bug writeup! I am seeing this issue too https://jsfiddle.net/bilgehansolo/0vmL5cse/ here is the same code on a fiddle. Also tried passing the value as a defaultValue instead of children, it still had the same problem.

Also wanted to note that this is probably not a safari bug https://jsfiddle.net/bilgehansolo/3mwroLys/ textarea as pure html element works as expected.

from react.

keithamus avatar keithamus commented on May 3, 2024 1

Instead of setting the value inside the node, I refactored it to use a useEffect and set the actual DOM nodes .value. The bug seems to not be present in this case. https://jsfiddle.net/nkrLvm7w/

from react.

iansan5653 avatar iansan5653 commented on May 3, 2024 1

Oh interesting. Maybe a better title than would be "textarea inputs in Safari stop accepting input on certain empty lines" 🤔

from react.

blghns avatar blghns commented on May 3, 2024

I wonder if this is a React bug or a ReactDOM bug.

from react.

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.