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

Add note about cancelling modal events to modal.md #38411

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

crespire
Copy link

@crespire crespire commented Apr 5, 2023

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Documentation change only.

Related issues

Adds a note about cancelling a modal event by `return event.preventDefault();`
Copy link
Member

@julien-deramond julien-deramond left a 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.

site/content/docs/5.3/components/modal.md Outdated Show resolved Hide resolved
@crespire
Copy link
Author

crespire commented Feb 27, 2024

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!

crespire and others added 2 commits February 27, 2024 11:57
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review in progress
Development

Successfully merging this pull request may close these issues.

3 participants