Skip to content

Node level issue - Walker realted? #2

@selfup

Description

@selfup

So it seems that using a helper method for dispatching has revealed some sort of bug 🐛

`<div>
  <p>${state.num}</p>
  <button onclick=${dispatch('up')}>+</button>
  <button onclick=${dispatch('down')}>-</button>
</div>`

This works fine!

But 😢

`<div>
  ${state.num}
  <button onclick=${dispatch('up')}>+</button>
  <button onclick=${dispatch('down')}>-</button>
</div>`;

This is broken. It seems that the way the DOM is constructed matters here? 🤔

Another neat bug is here:

`<div>
  ${state.num}
  <button onclick=${dispatch('up')}>+</button>
</div>`;

😭

Now nothing fires! So there must be a level required of DOM nodes it seems

Here is the codepen for reproduction of said bugs: https://codepen.io/selfup/pen/jZjopM?editors=0010

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions