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

wicketstuff-input-events - accumulating event listeners on AJAX components #711

Open
reckart opened this issue Sep 13, 2021 · 1 comment

Comments

@reckart
Copy link
Contributor

reckart commented Sep 13, 2021

When adding an InputBehavior to a component which is updated via AJAX, it can happen that the event listener registered by the InputBehavior is registered over and over again during AJAX updates. This is a resource leak and also can lead to input events being triggered way too often.

I believe a reasonable fix for this behavior would be to update the JS which registers the listener to remove any existing listener for the key binding for which the new listener is created. This is may be as simple as adding a shortcut.remove(keys) before the shortcut.add(keys,...)` call in the template.

@martin-g
Copy link
Member

Pull Requests are welcome!

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

No branches or pull requests

2 participants