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

AG-11918 Allow preventing double click event on chart #2681

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from

Conversation

jacobp100
Copy link
Contributor

This adds a stopImmediatePropagation method for some events. This is slightly flaky as the registration order of listeners is important, but it does have precedent in web standards.

Alternatively, we could make seriesAreaManager the only module to call regionManager.listenAll, then other modules would call seriesAreaManager.addListener('click', ...), which would have the defaultPrevented logic already checked

@@ -42,6 +66,8 @@ export class Listeners<EventType extends string, EventHandler extends Handler> {
} catch (e) {
Logger.errorOnce(e);
}

if (params.length === 1 && immediatePropagationStopped(params[0])) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify which specific handlers you are trying to stop calling? Intuitively, it might make more sense to just check the defaultPrevented property in the handlers that are causing problems.

@alantreadway alantreadway changed the base branch from latest to next October 14, 2024 09:51
Base automatically changed from next to latest October 22, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants