I have an asp.net app with a modal fancybox set up as an iframe. I have a process where I am scanning a credit card and the fancybox goes away as soon as the scan takes place. I can reproduce this by simply hitting the enter key. So, it appears a postback is causing the fancybox to close.
I have tried several things, but nothing seems to work. Here is how the fancybox is orginlly loaded:
$.fancybox({
'modal': true,
'width': '100%',
'height': 1300,
'padding': 5,
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'type': 'iframe',
'href': storeUrl,
'title': 'Welcome to the Store',
'titlePosition': 'over',
'onStart': function ()
{
openSF();
},
'onClosed': function ()
{
closedSF();
}
});
Try binding the form in the iframe to a jquery function to capture any posts that are happening. We use barcode scanners at work and each time one is scanned the characters are returned, plus a CRLF which submits the form. This could be happening with the credit card scanner.