Skip to content

fix: don't consume clicks when no onClick given (fix #274)#337

Open
jacobq wants to merge 1 commit intomansona:mainfrom
jacobq:fix-click
Open

fix: don't consume clicks when no onClick given (fix #274)#337
jacobq wants to merge 1 commit intomansona:mainfrom
jacobq:fix-click

Conversation

@jacobq
Copy link
Copy Markdown
Contributor

@jacobq jacobq commented Mar 11, 2022

To avoid the problems described in #269 and #274 (that #270 was supposed to fix) this PR proposes making the handleOnClick function inert when @onClick is not provided.

Demo: https://github.com/jacobq/ecm-clickProblem

@jacobq
Copy link
Copy Markdown
Contributor Author

jacobq commented May 26, 2022

Alternatively, the event could be passed to the onClick handler so that the consumer can decide whether to preventDefault, stopPropagation, etc. as needed.

LawnGnome added a commit to LawnGnome/crates.io that referenced this pull request Apr 8, 2026
This pulls in the changes on the `crates-io-fork` branch of
https://github.com/LawnGnome/ember-cli-notifications, which gets us:

* The fix in mansona/ember-cli-notifications#337 for `onClick` handlers.
* A new `onDismiss` option.
LawnGnome added a commit to rust-lang/crates.io that referenced this pull request Apr 13, 2026
* pnpm: patch ember-cli-notifications

This pulls in the changes on the `crates-io-fork` branch of
https://github.com/LawnGnome/ember-cli-notifications, which gets us:

* The fix in mansona/ember-cli-notifications#337 for `onClick` handlers.
* A new `onDismiss` option.

* app: track which banner messages have been dismissed

* svelte: add `onDismiss` to notification options

* svelte: persist the dismissed state of global banner messages

* app/services/banner-message: use local storage instead of cookies

* svelte: refactor dismissed banner tracking to use local storage

* svelte: port notification onDismiss test to use vitest

* e2e: add test for banner messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant