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

Consider adding support for data-prevent-double-click="true" #17

Open
frankieroberto opened this issue Sep 13, 2023 · 0 comments
Open
Labels
question Further information is requested

Comments

@frankieroberto
Copy link
Contributor

The Design System guidance for buttons says:

If you are working in production and research shows that users are frequently sending information twice, you can configure the button to ignore the second click.

To do this, set the data-prevent-double-click attribute to true.

However it also says:

In the case of slow connections, aim to give the user information about what’s happening, for example, by showing a loading spinner or a modal, before using data-prevent-double-click.

So we shouldn't expect it to be set on every button. Instead, it could be opt-in?

  click_govuk_button("Send", prevent_double_click: true)

cc @peteryates @paulrobertlloyd

@frankieroberto frankieroberto added the question Further information is requested label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant