Code Monkey home page Code Monkey logo

Comments (3)

gdotdesign avatar gdotdesign commented on September 18, 2024

Am I right that it's only happening if the input is focused and not readonly?
Here is a modified example: https://gist.github.com/gdotdesign/f2dcb32b5b2843452876f89d5d303094

from html.

knowthen avatar knowthen commented on September 18, 2024

I missed the conversation about this on #elm-dev yesterday. The most likely reason I would need this (or some other equivalent) is to clear the value of an input after a form submit, for example If I had a chat app, and I had an input used to key the message, I'd need some way of clearing the input value after the message was submitted.
I think @rtfeldman suggestion would work good:

tl;dr value is innately buggy and should probably be replaced by defaultValue + setValue

I'm not sure I like removing the value function (attribute), as it reduces elm-html parity with html. Maybe keep value, with bold guidance to consider the alternative (whatever that might be).

From a perf stand point: I see how this might make perf testing look worse but I'm having a hard time seeing how this would result in perf issues in most real scenarios.. Might be short sighted on my part.

from html.

evancz avatar evancz commented on September 18, 2024

I did a fix for this in elm-lang/virtual-dom@4be12eb

from html.

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.