Issue 134: Selfclose problem in FF2
Status:  WontFix
Owner: ----
Closed:  Jan 2009
Reported by carljoha...@gmail.com, Dec 13, 2008
What steps will reproduce the problem?
1. Write a page which outputs:
<script type="text/javascript">
$.nyroModalRemove();
</script>
2. Open this page through some standard nyroModal-way, for example:
<a href="your.page" class="nyroModal">Click me</a>

What is the expected output? What do you see instead?
I expect the nyroModal to close, sometimes it does, sometimes it shows an
empty box with the min-height and min-width. I've tried to get to the
bottom (for some hours anyway) of the problem and I've found no logical
relation to why it sometimes closes and why it doesnt sometimes. It seems
to be completely random.

What version of the product are you using? On what operating system?
jquery.nyroModal-1.3.0.min.js
FireFox 2
[ Windows XP (Home I think ;) ]

Please provide any additional information below.
I've tried some in IE7 (I think it's 7 anyway) and it seems to work better
there. Could perhaps help? 
Have not tried with FF3, IE6 or Google Chrome or any other browsers.

Dec 14, 2008
Project Member #1 nyro...@gmail.com
One thing I don't understand:
Why would you like to open a nyroModal if you close as soon as it's opened?
Dec 15, 2008
#2 carljoha...@gmail.com
Good question =) Well, of course I could rebuild it, but I've snared myself into a
position where I use the nyroModal as a AJAX-call, which sometimes produces output,
and sometimes don't. The logic is a bit tricky and in a developing perspective I
wanted to put all of that logic into one single place/file.

A rebuild is of course possible, but it seems only to me as a waste of a lot of time,
whilst a nyroModal which only produces a javascript which closes itself shouldn't
cause any trouble.

A little update on the browser-compatability: IE7 seems, after some more testing, to
produce the bug too.
Dec 17, 2008
Project Member #3 nyro...@gmail.com
Why not doing something like:
1) Regular Ajax call to your page
2) on your serverside script, you could send a 404 header if nothing should shown.
3) on the success function of your ajax call, you will open nyroModal manually.

I think it will be a better solution.

regarding the bug you reported, I'll check to see what's happen, but I won't spend a
lot of time on it as it doesn't make much sense as far as I understand.
Labels: Type-Other
Jan 9, 2009
#4 carljoha...@gmail.com
Thanks anyways! Somehow I got rid of the bug (at least I think I did).

I guess I used nyroModal because it was simple, very easy to use and seemed as the
easiest way to do it. My code includes some unknown (based on user input) jumping
back and forth between nyroModal-boxes, which makes it much more complicated to
reproduce an easy way to the same with out your great script ;)

Anyways, I've come up with a different "problem", I've noticed that a call for a page
with no content in it (or in IE[7?], only content inside a <script>-tag) produces the
error-window to popup, is that supposed to be that way? And if so, is it possible to
change that manually? 
Jan 27, 2009
Project Member #5 nyro...@gmail.com
If your loaded page is a fully HTML page (<html>, <head> and <body>) even empty, the
error won't be trigger.
Status: WontFix