Coder Social home page Coder Social logo

Comments (4)

rhendric avatar rhendric commented on June 28, 2024 2

I think this issue is a bug in purescript-halogen-vdom; it looks like it's because in these lines, the option elements get added to the select before the select has its multiple attribute set, and it should probably be the other way around?

https://github.com/purescript-halogen/purescript-halogen-vdom/blob/e6630023500841d910f6690fa1bc6ba649ac6f15/src/Halogen/VDom/DOM.purs#L117-L118

from purescript-halogen.

garyb avatar garyb commented on June 28, 2024

I think this issue is a bug in purescript-halogen-vdom; it looks like it's because in these lines, the option elements get added to the select before the select has its multiple attribute set, and it should probably be the other way around?

Good spot! That seems very likely.

from purescript-halogen.

rhendric avatar rhendric commented on June 28, 2024

Handling attributes after children was an intentional decision very early on in purescript-halogen/purescript-halogen-vdom@2ccb0b8 (I assume it's intentional because the same change was made here in both render and patch); maybe @natefaubion remembers why it should be this way? The right thing might be to handle some HTML elements differently, as inelegant as that would be.

from purescript-halogen.

natefaubion avatar natefaubion commented on June 28, 2024

I don't have a clear memory of why. That PR was mainly about tweaking stuff in such a way to get the compiler to generate optimal code. It's possible that before/after made a difference there (such as where the let bindings are generated). If one were implementing extensions to the vdom machine, I could maybe see effect ordering being important. By putting attrs after, you know that all children have been initialized before building parent attrs. I don't know if that's important for anyone though.

from purescript-halogen.

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.