Magnific-Popup in a bootstrap modal dialog. Close button - Errors

Created on 5 Jan 2016  路  7Comments  路  Source: dimsemenov/Magnific-Popup

I would like to use Magic-Popup in a bootstrap modal.

A solution is: . Maybe can be implemented as default.

Problem is close button:

Uncaught RangeError: Maximum call stack size exceeded.
<<

or in mozilla

too much recursion
...ction(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"fo...
<<

Also, ESC key close both: Magic-Popup and bootstrap modal.

Most helpful comment

solution above "hide" problem . if use bootstrap and then popup magnific popup then all text inputs became inaccessable , any click on their area generate error Maximum call stack size exceeded. solution above stop error , but areas still inacessable .

so , I did

$(document).off('focusin' );

after after magnific load ( any funcrion called after it loaded , you may do inside .ready(). it clear all 'focusin' handlers . no magnific popup code modification need .

hope it will help someone .

All 7 comments

Im having this same issue. Simplified test case: http://codepen.io/craigh/pen/GoWWOK

Line 375 seems to be the problem. I commented it out and the Maximum call stack size exceeded error went away.

_document.on('focusin' + EVENT_NS, mfp._onFocusIn);

Did the trick for me as well. Thanks!

same issue here

Bravo sir!

This solution doesn't work for me. We use bower to handle js dependencies.

Is there a way to solve this without altering the original library?

solution above "hide" problem . if use bootstrap and then popup magnific popup then all text inputs became inaccessable , any click on their area generate error Maximum call stack size exceeded. solution above stop error , but areas still inacessable .

so , I did

$(document).off('focusin' );

after after magnific load ( any funcrion called after it loaded , you may do inside .ready(). it clear all 'focusin' handlers . no magnific popup code modification need .

hope it will help someone .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

landitus picture landitus  路  3Comments

amir-rahnama picture amir-rahnama  路  4Comments

apasho picture apasho  路  4Comments

mifas picture mifas  路  5Comments

klihelp picture klihelp  路  4Comments