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

A possible flaw about modal.toggle method #12845

Closed
ktmud opened this issue Feb 25, 2014 · 1 comment
Closed

A possible flaw about modal.toggle method #12845

ktmud opened this issue Feb 25, 2014 · 1 comment
Labels
Milestone

Comments

@ktmud
Copy link

ktmud commented Feb 25, 2014

modal.toggle passes an related target to hide:

Modal.prototype.toggle = function (_relatedTarget) {
  return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
}

But hide() accepts an event as argument:

Modal.prototype.hide = function (e) {
  if (e) e.preventDefault()

  e = $.Event('hide.bs.modal')

  this.$element.trigger(e)

Is this by design or not?

@cvrebert cvrebert added the js label Feb 25, 2014
hnrch02 added a commit to hnrch02/bootstrap that referenced this issue Feb 26, 2014
@hnrch02
Copy link
Collaborator

hnrch02 commented Feb 26, 2014

Addressed by #12850.

@cvrebert cvrebert added this to the v3.2.0 milestone Feb 26, 2014
michaek pushed a commit to michaek/bootstrap that referenced this issue May 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants