-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Add note about cancelling modal events to modal.md #38411
base: main
Are you sure you want to change the base?
Conversation
Adds a note about cancelling a modal event by `return event.preventDefault();`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @crespire, there are some issues to fix with the content that are in my comments.
I'm wondering if it's not a duplicate of https://getbootstrap.com/docs/5.3/getting-started/javascript/#events. This concept is already explained generally in the JavaScript documentation.
Thanks for the note. I'm happy to change this to a link reference instead if you feel that's more ideal. I think sometimes folks read sections of docs in isolation and details like this can get lost or can be a somewhat "unknown unknown" for more junior folks (like myself!). Let me know what direction you want to take on this and I'm happy to make the changes, but I've accepted your other suggestions! |
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Adds a note about cancelling a modal event by
return event.preventDefault();
Description
Adds additional code snippet demonstrating cancelling a modal event.
Motivation & Context
As someone new to Bootstrap, I didn't see this behaviour documented but it exists and was fixed with #34087 a few years ago.
Type of changes
Checklist
npm run lint
)Live previews
Documentation change only.
Related issues