Closed MiguelValdez-mv closed 10 months ago
Start a new pull request in StackBlitz Codeflow.
Just tried to reproduce this on the playground and it seems to work correctly. This may already be fixed in latest?
@nnelgxorz I just checked and still the error is still there in the latest version.
Here is a 20 second video showing the error:
Hi everyone,
just accidentally faced the same problem. Clicking on subnode of disabled button is not prevented. Found one fast crutch-solution, maybe it helps someone:
const btnHandler = $((event: MouseEvent) => {
if (!(event.target as Element)?.closest("button")?.disabled) {
// do something
}
});
this works as expected in v1.3.5.
Which component is affected?
Qwik Runtime
Describe the bug
Starting from the following example:
You have that when pressing the
Test 1
button theonClick$
event does not occur, becausedisabled={true}
, which is fine. However, pressing theTest 2
button displays theTest 2
console because that button'sonClick$
event is called despitedisabled={true}
which should not happen.Reproduction
https://stackblitz.com/edit/qwik-starter-e5zbny?file=src/root.tsx
Steps to reproduce
Execute
npm run start
System Info
Additional Information
No response