Skip to content

Todo starter unexpected behavior #236

@carsonburr

Description

@carsonburr

When building and serving the qwik todo starter, the todo check boxes don't behave as expected. Checking off the first box succeeds, but then clicking the second box leaves the text without the strikethrough and leaves the checkbox image in the unchecked state. This only occurs when building and then serving. It doesn't occur when running in dev mode.

npm version: 8.4.1
node version: 16.13.2
browser: chromium 98
os: linux

steps to reproduce:
1.

$ npm init qwik@latest # todo -> express
$ cd qwik-app
$ npm install
$ npm run build
$ npm run serve
  1. click the first checkbox
  2. click the second checkbox

other notes:
I dug into this a bit and it looks like there are 2 instances of the qwik loader script, which both try to handle the click event. One qwik loader gets inlined with the initial html, the other lazily imported after the first event is triggered. I think this is causing the item.completed to be toggled twice each click.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions