Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: onClickCapture not working? #4955

Closed
3 tasks done
kraftwer1 opened this issue Oct 20, 2023 · 2 comments · Fixed by #4968
Closed
3 tasks done

bug: onClickCapture not working? #4955

kraftwer1 opened this issue Oct 20, 2023 · 2 comments · Fixed by #4968
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@kraftwer1
Copy link
Contributor

Prerequisites

Stencil Version

4.5.0

Current Behavior

This is not working, "click" won't appear in the console:

onClickCapture={() => console.log('click')}

Expected Behavior

"click" appears in the console.

System Info

No response

Steps to Reproduce

In the stencil-component-starter repo, add this line:

render() {
  return <div onClickCapture={() => console.log('click')}>Hello, World! I'm {this.getText()}</div>;
}

Code Reproduction URL

https://github.com/ionic-team/stencil-component-starter/

Additional Information

I know I can add use @Listen("click", { capture: true }) and do some filtering, but I'd prefer the simpler, declarative JSX variant. If there's a reason that onClickCapture does not work, maybe it should be removed from the stencil-public-runtime.d.ts.

Note that I've tested using the latest 4.5.0, but it also happens on lower versions.

@ionitron-bot ionitron-bot bot added the triage label Oct 20, 2023
@tanner-reits tanner-reits self-assigned this Oct 23, 2023
@tanner-reits
Copy link
Contributor

Hey @kraftwer1 👋

Thanks for reporting this issue! I was able to confirm there's a problem and should have a fix up soon. Someone from the team will post again here once it makes it into an upcoming release!

@tanner-reits tanner-reits added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Oct 23, 2023
@rwaskiewicz
Copy link
Contributor

The fix for this issue has been released as a part of today's Stencil v4.7.0 release. Should the issue reappear, please feel free to open a new ticket. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants