Skip to content

docs: fix modal JS examples, list numbering, and typos - #42879

Merged
julien-deramond merged 3 commits into
twbs:mainfrom
minirang:docs/fix-typos-and-js-examples
Aug 29, 2026
Merged

docs: fix modal JS examples, list numbering, and typos#42879
julien-deramond merged 3 commits into
twbs:mainfrom
minirang:docs/fix-typos-and-js-examples

Conversation

@minirang

@minirang minirang commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Description

  • Corrects the broken JavaScript modal example by properly fetching the modal instance via bootstrap.Modal.getInstance() and listening to the correct event (hidden.bs.modal).
  • Fixes sequential list numbering in the Vite getting-started guide (from 3, 4 to 2, 3).
  • Fixes minor typos and casing in the migration documentation (e.g., LibSass and .rounded-lg).

Motivation & Context

The previous JavaScript example for destroying a modal used an incorrect, non-existent event (shown.bs.hidden) and attempted to call .hide() and .dispose() in a way that would fail or cause unintended behavior. Updating this with getInstance and the proper event lifecycle ensures users can successfully copy-paste working code.

The list numbering and typos were also corrected to improve the overall clarity and professionalism of the documentation.

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

Related issues

None. This was found while reviewing the documentation.

@julien-deramond julien-deramond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the various docs fixes @minirang, good catch :)

I've added c551406 so that we always use myModalEl var name each time we call document.querySelector('#myModal') for consistency in the page.

@github-project-automation github-project-automation Bot moved this from Needs review to Ready to merge in v5.4.0 Aug 29, 2026
@julien-deramond
julien-deramond merged commit b66d343 into twbs:main Aug 29, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in v5.4.0 Aug 29, 2026
@minirang
minirang deleted the docs/fix-typos-and-js-examples branch August 29, 2026 08:01
@minirang

Copy link
Copy Markdown
Contributor Author

Thank you, @julien-deramond. I am glad to contribute to this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants