You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modal component doesn't work without including popper.min.js before bootstrap.js, console shows the error "Bootstrap dropdown require Popper.js"
Bootstrap v4
Nope people we'll only see this error if they are trying to use our Dropdowns/Tooltips or Popovers
seems a bit redundant because we can simply check if Popper is available or not
Finally it seems we have no solution here (see : #24306)
so @m01key you have to add Popper.js because 3 of our plugins use it or you can wait for our next release which will add a new dist file with Popper.js inside
Either we do what I suggested and throw in the constructor if a component which requires popper is used, or we leave it as it. Otherwise it will throw an error even though one might not use a popper descendant component.
Activity
Johann-S commentedon Oct 9, 2017
Indeed Bootstrap depends on Popper.js for our Tooltips/Dropdown and Popovers plugins.
@XhmikosR what do you think about moving this test : https://github.com/twbs/bootstrap/blob/v4-dev/js/src/tooltip.js#L15-L21 in our plugins constructor ?
Because folks who don't need to use those components, should be able to do that without this error
XhmikosR commentedon Oct 9, 2017
@Johann-S: wouldn't it then throw for people who don't want to use those components?
How about we have an extra global var like
needsPopperand act accordingly in our constructor?Johann-S commentedon Oct 9, 2017
Nope people we'll only see this error if they are trying to use our Dropdowns/Tooltips or Popovers
seems a bit redundant because we can simply check if
Popperis available or notXhmikosR commentedon Oct 9, 2017
@Johann-S: please make a PR and CC me.
Johann-S commentedon Oct 9, 2017
Finally it seems we have no solution here (see : #24306)
so @m01key you have to add Popper.js because 3 of our plugins use it or you can wait for our next release which will add a new dist file with Popper.js inside
XhmikosR commentedon Oct 9, 2017
Either we do what I suggested and throw in the constructor if a component which requires popper is used, or we leave it as it. Otherwise it will throw an error even though one might not use a popper descendant component.
Johann-S commentedon Oct 9, 2017
Maybe I don't see how you'll do that but for me it wont change anything because our plugins are wrapped into IIFE ended with :
})($, Popper)XhmikosR commentedon Oct 9, 2017
True that. Not sure if there's another way to do things, but with our current implementation I don't think we can do a lot.
Johann-S commentedon Oct 9, 2017
true, it's hard to add optional dep 😟
Johann-S commentedon Oct 25, 2017
Maybe instead of throwing an error we should just use
console.warn? @XhmikosR