Email conversation
From | Graste |
To | Me |
Subject | Perfect popups article - possible Opera bug? |
Date | 26 April 2005 15:46 |
Hi,
I scrolled through your "perfect popups" article and found it very strange
to notice the following in section: "Resizing a popup to perfectly fit an
image, even if you do not know how big that image is":
1. After clicking on "http://www.howtocreate.co.uk/me.jpg" the popup with
your image appears as intended.
2. Click on the top site bar (www.howtocreate.co.uk) to retrieve the
address bar of this window.
3. Click into the address bar (http://www.howtocreate.co.uk).
-> The popup window disappears immediately. You're not able to edit the
web page address or click something in the start bar.
I tried the popup links with Firefox 1.0.3, Opera 7.54u2 and Opera8b3.
Opera 8b3 and Opera8 are the only browsers with problems as it seems to me
- no other browser lets you retrieve the address bar of a popup window.
Since you work for Opera afaik I thought myself, that I first write this
to you. Perhaps it's no real bug, but some strange behaviour triggered by
your script. (I had no time to further investigate your script or your
article at all - sry ;) Perhaps it is all my fault and I'm overseeing
something important. If that's the case - nevermind. :)=
Regards,
Graste
From | Me |
To | Graste |
Subject | Re: Perfect popups article - possible Opera bug? |
Date | 26 April 2005 17:26 |
Graste,
> Click into the address bar.
> -> The popup window disappears immediately. You're not able to edit the
> web page address or click something in the start bar.
The popup uses onblur="window.close();" to enable automatic closing - that
is an option that can be specified when calling the popup.
Strictly speaking, onblur for the page is not part of the DOM or HTML
standards, but all browsers support it anyway. And all browsers I tested
behave the same way. Clicking on the address field fires onblur, but
clicking buttons or toolbars does not. Since this is not in any standard,
I would say that whatever the browser does is ok, but it is nice to see the
behaviour is consistent.
The only thing that refers to it is the old Netscape JavaScript 1.3
documentation:
http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/handlers.html#1119670
but that just says "onBlur specifies JavaScript code to execute when a
window loses focus", which is not very helpful, because it doesn't say
anything about what constitutes loss of focus. To be honest, I am just
happy that all browsers have chosen to implement the same behaviour, even
if it is weird.
> I tried the popup links with Firefox 1.0.3, Opera 7.54u2 and Opera8b3.
> Opera 8b3 and Opera8 are the only browsers with problems as it seems to me
Firefox allows you to disable hiding of the address bar via the
'dom.disable_window_open_feature.location' setting in about:config (I
recommend enabling this option to protect yourself against phishing scams).
If enabled, its behaviour is exactly the same as Opera's - it will close if
you click on the address field.
As a side note, when originally creating the popup code, I found that
certain other parts of the toolbar (such as bookmarks) in Firefox also
trigger onblur when clicked. But in this case, Firefox crashes:
https://bugzilla.mozilla.org/show_bug.cgi?id=268384
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
From | Graste |
To | Me |
Subject | Re: Perfect popups article - possible Opera bug? |
Date | 26 April 2005 19:59 |
Tarquin,
thanks for your fast and insightful reply. I didn't see that onblur thingy.
So thanks for the hints and keep up the great work (on your whole website).
I find it somewhat curious to see the onblur-event firing if someone clicks
on the address bar while not firing it, when clicking on the forward/back
buttons. But - if all browsers behave somewhat similar it should not be
changed imho. Xbrowser scripting was/is difficult enough. ;)
Regards,
Graste