dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.38k stars 3.49k forks source link

Options are not updated if already open #889

Open glebtv opened 8 years ago

glebtv commented 8 years ago

Options (for example, callbacks) are not updated if pop up is already open Because of this: https://github.com/dimsemenov/Magnific-Popup/blob/master/src/js/core.js#L167

For callbacks I fixed it like this:

if(mfp.isOpen) {
  mfp.st.callbacks = data.callbacks;
  mfp.updateItemHTML();
  return;
}
Brozgar commented 6 years ago

Came across the same issue, fixed by just removing this condition altogether (the suggested addition didn't work).