Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #24045
Closed
Open
Issue created Sep 22, 2017 by Administrator@rootContributor

Bootstrap modal options manipulation issue after initialisation.

Created by: samuelting

Problem:

According to documentation in https://getbootstrap.com/docs/4.0/components/modal/#via-javascript, modal options can be passed via javascript $().modal method. However, after the modal is initialised, when I passes another option object into .modal method as parameter, newer options is not effective.

For example, initially, the #exampleModal has its options set as

$("#exampleModal").modal({
          "backdrop": "static",
          "show": false
})

#examplemodal behaves as expected. The user cannot dismiss the modal by clicking the backdrop. However, in another part of the program, when I try to set the option of #exampleModal to be this one

$("#exampleModal").modal({
   "backdrop": true
})

However, The modal cannot be dismissed when the user click the backdrop of the modal.

Expected behavior:

The modal can be dismissed by clicking the backdrop after "backdrop": true option is set.

Demo link: https://jsbin.com/qotoguv/edit?html,js,output

Assignee
Assign to
Time tracking