Giter Site home page Giter Site logo

Comments (15)

sethidden avatar sethidden commented on May 21, 2024 2

I hope it's solid now

Yep, it is ๐ŸŽ‰ Tested on my app where the error happened on 1.2.1-1.2.3 but 1.2.4 fixes it :)

Thanks so much!

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024 1

@3nuc It's very helpful. Thanks for helping!

Will look into that one later today ๐Ÿ‘

Edit:
I've minimized the reproduction to this:
https://jsfiddle.net/hirokiosame/hxqo85n2/

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

Seems to work fine: https://codepen.io/privatenumber/pen/dypqEXb

Can you provide a reproduction?

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

Closing since stale

from vue-frag.

sethidden avatar sethidden commented on May 21, 2024

@privatenumber I managed to reproduce this. Can you please reopen this issue if the repro is ok?

https://codesandbox.io/s/github/3nuc/vue-frag-issue-16?file=/src/App.vue

Conditions for this to happen:

  • (MyInput.vue) a component needs to have a root node that has a v-if on itself. That root node also needs to have v-frag
  • next to that component, create div with v-if
  • toggle visibility of both elements

Yeah you really need to do some ancient shamanic ritual to trigger this

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

Thanks @3nuc

I trimmed it further to this: https://codesandbox.io/s/admiring-minsky-zek6q?file=/src/MyInput.vue

I also tried reproducing the exact code in JSFiddle for something more bare but couldn't reproduce.
https://jsfiddle.net/hirokiosame/zyrd8q7w/

I'm currently curious if it's related to vue-loader/Vue CLI. Will experiment further.

Edit:
I narrowed it down to a template compilation only happening with the non-browser build:
https://jsfiddle.net/hirokiosame/7nd01byf/

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

Fix released in v1.2.1

from vue-frag.

sethidden avatar sethidden commented on May 21, 2024

@privatenumber I see that my previous repro doesn't trigger the error anymore. Thanks!

I updated to 1.2.1 in my work app and unfortunately the error still persists there. Looks like my repro case was only one of N possible cases
I've managed to reproduce the same error under 1.2.1 - I just added 2 MyInputs with :visible next to eachother - https://codesandbox.io/s/github/3nuc/vue-frag-issue-16

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

Good catch!

Minimal reproduction: https://jsfiddle.net/hirokiosame/cnxwz9d4/

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

This case is still bugging: https://jsfiddle.net/hirokiosame/tfjp85g1/

from vue-frag.

sethidden avatar sethidden commented on May 21, 2024

Thanks! Managed to find this on 1.2.3 too:
https://jsfiddle.net/astg047y/4/

You're fixing the repros so well and then I come out with some crazy/stupid edge case like adding the second toggler above ๐Ÿ˜… Please let me know if they're getting too ridiculous

EDIT: Hmm the jsfiddle is showing this now
image
but previously it was the standard "Symbol() of null" even though I didn't change anything ๐Ÿค”

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

Thanks for that test @3nuc

Surfaced a lot of edge-cases and bugs that helped me come to a more holistic approach.

I hope it's solid now: https://jsfiddle.net/hirokiosame/vfxc594p/

from vue-frag.

sethidden avatar sethidden commented on May 21, 2024

There's still one edge case out there. Experiencing it in a different part of my project right now but haven't been able to reproduce in jsfiddle yet.

TypeError: can't access property Symbol(), parent is null
  patchParentMethods frag.esm.js:124

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

@3nuc please let me know when you are able to reproduce it ๐Ÿ™

from vue-frag.

privatenumber avatar privatenumber commented on May 21, 2024

@sethidden

I released a refactor with exhaustive tests to make sure the DOM APIs return the exact expected values.

Do you mind seeing if that works better for you?

from vue-frag.

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.