Archive for the 'Browsers' Category

IE9 background shifting bug

Thursday, March 17th, 2011

On Tuesday, I mentioned that the brand-new IE9 browser is out; yesterday and today, I am already fighting with the first IE9-bug I encountered… :-(

The story in short: I installed IE9 mainly because I was curious to see how good is the support for some of the new CSS3 properties — rounded corners, box-shadows, text-shadow, gradients, transitions, and so on.

So, as soon as IE9 was officially released, I installed it, then restarted my Win7 machine, and lo and behold! in one of the first designs I tested in it, I found a new bug (new in the sense: a bug that I never encountered in IE8 or IE7): a strange one-pixel shift in the background image of a page, when (un)certain conditions are met!

Here’s a test page:

http://www.optimiced.com/lab/2011/ie9-background-bug/

Test conditions:

Internet Explorer 9 (you need Windows Vista or Windows 7; Windows XP is not supported).
— The browser window must be maximized.
— I tested with the following screen resolutions: 1680×1050, 1440×900. (Not sure if bug will happen if your screen is larger or smaller.)
— Open the test page, wait for it to load.
— With the mouse, scroll down to the bottom of the page, then up to the beginning. You have a 50%/50% chance to see a one-pixel shift in some part of the background of the page, in the upper part! (At least, I see such 1px shift…)
— If you refresh the page, bug is gone. If you scroll again down-up once or twice, bug is back again!
— (Update 1) If the Menu Bar is not open in IE9, the bug is not triggered. If the Menu Bar is open, it is triggered! (Just in case: screenshot of the toolbars that are open when the bug can be reproduced: Menu bar, Status bar.)
— (Update 2) If you have AERO disabled, the bug won’t show up (for example, if you use Windows Classic or Windows 7 Basic theme). If AERO is enabled (Windows 7 theme, with AERO = “ON”), the bug is there! (Big thanks to Adam Kiss, who made some tests.)
— (Update 3) “Show tabs on a separate row” should not be enabled (and it’s not, by default). If you select “shows tabs on a separate row”, bug will disappear too (?).
— If you put more Lorem Ipsum text in the main column, bug is gone.
— If you reduce (or increase?) the height of the main column (#content) in which the Lorem Ipsum text is located, the bug no longer appears. Currently, the div#content has a min-height of 500px.
— If you minimize the window of IE9 and then back again to maximized state, the bug disappears (page is re-rendered after a minimize > restore-back-to-maximized operation).
— The 1px shift occurs only in the upper part of the background image, and quite randomly.

Now, the background image is applied to the body element:


body {
background: #8F8F8F url(../img/body-test.png) 0 0 repeat-x;
}

…and there is nothing special in the code.

The left part of this background-image is the original image, the right part is for testing purposes — the horizontal lines help see if there are any shifts in the background image position. Otherwise, that was the original.

After many tries I discovered that the format of the background image does not matter (PNG, JPG, GIF…) as well as its size.

You can scroll with a mouse or the up-down arrows on the keyboard.

Of course, it’s possible that something in my setup (Win7/IE9) is wrong and so any kind of third-party confirmation for the existence (or non-existense) of this bug would be appreciated! (Btw, I never saw such a bug in IE7/8, Firefox, Opera, Safari, Chrome. Only in IE9.)

Here’s how the test page is supposed to look:

And here how it looks after a couple of scrollings down/up:

Also please note that after scrolling down/up, and then mouse-overing the elements in the navigation, another visual strangeness happens:

So, in “ideal conditions”, the page should look like this, but after some scrolling, here’s how it looks like (or even like this).

* * *

Otherwise, testing IE9 is fun — for now I see that CSS3 transitions and text-shadows are not supported. Border-radius and box-shadow are supported, though, which is nice. I’ll be testing more.

Any help is appreciated! Did I discover a bug? If yes, what triggers it?…

IE6-IE9: 10 years

Tuesday, March 15th, 2011

10 years is a lot. In the Web, 10 years is quite a lot. IE6 was one of the best browsers when it hit the market in 2000-2001. Then it slowly started to transform itself into a brake for new technologies on the Web. While all other browsers (Mozilla, Mozilla Firefox, Opera, Safari, and now Chrome) were adopting new technologies at a fast pace and improving their rendering of web pages, IE6 remained un-changed.

IE6-7-8-...9!

Microsoft now say that IE6 is history. And that IE9 (that officially was released today and is available for all users of Windows Vista and Windows 7) is much better.

We’ll see! :)

Firefox 3.0/3.5 doesn’t warn when closing multiple tabs (a solution)

Wednesday, July 22nd, 2009

If you have this problem:

1) You have set the option in Mozilla Firefox to open all of your tabs automatically, each time the browser starts,
2) You do not see the warning “You are about to close n tabs. Are you sure you want to continue?” when you try to close the Firefox window (intentionally or by accident), and
3) You do not want Firefox 3.0 to ask you each time you close it, if you like to save or not save your browsing session, but save the session automatically,

…then you can jump straight to the solution!

But if you are curious about the details, you may continue to read below! :-)

A short introduction

Firefox 3 is by far the best browser I know!

It is secure, it supports Web standards and CSS 2.1 (and now, CSS 3, too!), it is fun to use, it has a built-in Session Saver (when you close Firefox with all of your opened tabs, it can re-open them next time you start it), and there are a variety of very useful add-ons (extensions) made for it, which extend its functionality and make it even better!

(NOTE: Firefox 3.5 was released on June 30th, 2009, but I will wait maybe a couple of more weeks, before upgrading to it, because still some very useful add-ons for Firefox 3.0 are not yet upgraded to be compatible with version 3.5.)

When I made the switch from Firefox 2.0 to Firefox 3.0, one thing puzzled me, though: the standard warning, when you close a Firefox window with more than 2 tabs open — it has disappeared… well, in a way, at least!

Firefox close all tabs warning

Firefox 2.0 » Firefox 3.0

As you (probably) know, Firefox can automatically save your browsing session, when you close it. This means, when you close the Firefox window, all tabs that you have open inside it, will be re-opened next time you start it again. This is controlled via an option, found in Tools > Options > Main > Startup: “When Firefox starts: Show my windows & tabs from last time” [ Options > Main > Startup: When Firefox starts: Show my windows & tabs from last time”>screenshot].

NOTE: You can also select: “Show my home page” or “Show a blank page” in Tools > Options > Main > Startup, but in this case, the session will not be saved automatically, but instead, Firefox will ask you each time you close it: “Do you want Firefox to save your tabs for the next time it starts?” and your options are then: “Save and Quit” — all tabs will be re-opened next time you start Firefox, just “Quit” — Firefox will start with either your home page or a blank page, and “Cancel” — this won’t close Firefox [screenshot].

So, in Options, if you select “When Firefox starts: Show my windows & tabs from last time”, you can safely close Firefox, and next time it starts, it will restore your browsing session — for this to work, though, you must have all tabs opened inside one window, or else, only the last window that you have closed will have its tabs re-opened on next startup.

You can also decide if you want your tabs re-opened, each time you close the Firefox window. In this case, you can de-select “When Firefox starts: Show my windows & tabs from last time” and instead, choose “Show a blank page”. Then Firefox 3 will ask each time you try to close it, what do you prefer: your session saved, or not.

But if you’re like me, then you may prefer all opened tabs to be saved automatically, and without any questions upon closing Firefox. In this case, you will select “When Firefox starts: Show my windows & tabs from last time” in Options and the dialog “Save and Quit?”, “Quit?”, “Cancel?” will not be shown when you close the Firefox window.

There’s one problem, though.

Firefox 3.0 will not warn you when you close a window with multiple tabs!

Well, this is not exactly true. It will not warn you, when several conditions are met:

1) In Tools > Options > Main > Startup, you must specify the option “When Firefox starts: Show my windows & tabs from last time” (this is pretty common, especially for people who upgraded from Firefox 1.5/2.0 > 3.0, because most users prefer to re-open all tabs automatically, when they start Firefox), and…

2) You are closing the last open window of Firefox. (I prefer have all of my tabs opened inside one window — thus, when I close Firefox, all my tabs inside this window will be re-opened. But let’s suppose, you have two windows open, inside each window there are several tabs. When you try to close the first window, Firefox will warn you. When you try to close the second one, it will not warn you.)

The strangest thing is that the warning “You are about to close n tabs. Are you sure you want to continue?” will not appear, in this case, no matter what is the setting that you have specified in Tools > Options > Tabs > “Warn me when closing multiple tabs” [screenshot]!

In Firefox 2.0, when you try to close a window with multiple tabs open, and if you have checked the option in Tools > Options > Tabs > “Warn me when closing multiple tabs”, Firefox will always warn you, before you close the window, no matter if the window you are about to close is the last (and only one), or if you have set the option in Tools > Options > Main > Startup: “When Firefox starts: Show my windows & tabs from last time”.

In Firefox 3.0, when you try to close a window with multiple tabs open, and if you have checked the option in Tools > Options > Tabs > “Warn me when closing multiple tabs”, Firefox will warn you, before you close the window, only if you have specified “Open my home page” or “Open a blank page” in Tools > Options > Main > When Firefox starts (it will present you with the dialog “Save & Quit”, “Quit”, “Cancel”)… But if you have specified there “When Firefox starts: Show my windows & tabs from last time”, then Firefox will not warn you, but will silently close all tabs!

And this is intentional (as of Firefox version 3.0), because, as far as I know, there were several bugs logged in this regard (including bug 419009, “Warning if closing multiple tabs is not working”), but the functionality remained the same! If the user has specified “When Firefox starts: Show my windows & tabs from last time”, then, when closing Firefox, all of his tabs will be automatically restored, and there’s no data loss. But the user might close Firefox by accident, and in this case, there’s no way for him to be warned! And the option “Warn me when closing multiple tabs” was supposed (in Firefox 2.0) to fix just that: accidental closing of all of your opened tabs! But it’s gone in Firefox 3.0: now you can’t be warned before you close Firefox, if you have specified all of your tabs to be restored automatically, when Firefox starts!

Some claim that there’s an easy “fix” for this: The user is supposed to select “Show my home page” or “Show a blank page” in Tools > Options > Main > Startup, but in this case, Firefox will ask each time it is closed, if you want or do not want to save all of your tabs! (And this is something I don’t need — I want Firefox to open all of my tabs automatically, without asking!) Also, in this case, you might also accidentally click the wrong choice and have your session deleted (if you select “Quit” instead of “Save and Quit”).

I have searched for a true workaround for a long time. I wanted:

1) Firefox to automatically save all of my tabs & re-open them next time it starts, inside one window, and
2) I wanted to be warned, when I try to close the Firefox window.

I think I have found a very good (almost perfect)…

Solution to the problem

You will need to install one Firefox add-on first — “Tab Mix Plus”; it currently works for Firefox 3.0/3.5, and can be downloaded from here:

https://addons.mozilla.org/en-US/firefox/addon/1122

I will also recommend you to install the “Session Manager” addon, which works for FF 3.0/3.5:

https://addons.mozilla.org/en-US/firefox/addon/2324

(Session Manager will complement the other add-on pretty well, but this step is not required.)

In Tab Mix Plus, there’s an option which can restore the default behaviour of Firefox, when you try to close it!

To activate it in Firefox, go to Tools > Tab Mix Plus Options > Events > Tab Closing > “Warn me when closing multiple tabs”. If you check this option, then Firefox 3 will act as before: If you have multiple tabs open, and try to close the Firefox window, it’ll show you the standard warning “You are about to close n tabs. Are you sure you want to continue?”.

And you’ll see the warning, even if in Tools > Options > Main > Startup: “When Firefox starts: Show my windows & tabs from last time” is set!

That’s it! :-)

Final notes

— In Firefox options, I have set Firefox to remember my opened tabs session automatically, when I close Firefox. I open all tabs inside one window, so for me this option works very well: If I try to close the window with all opened tabs, Firefox now gives me a warning, as I expect. If I try to close the window by accident, I can click on ‘Cancel’ and if I really want to close it, then I select ‘Close Tabs’ and next time Firefox opens, all of my tabs are restored!

— For added “extra security”, I have also installed Session Manager add-on (see download link above). So in the rare case that I will close one Firefox window with some tabs open and then will see that in the background, there was one more window open (this may happen sometimes), I can still recover my session with all opened tabs, using the Session Manager — I can simply revert then to a previous backup session, using Tools > Session Manager > Backup Sessions [screenshot].

— I have tested this on Windows XP SP3, Firefox 3.0.12 and Tab Mix Plus 0.3.7.3, and it works as described. Only remember that Firefox will not give you a warning, if you try to close it using File > Exit (in this case it will silently close, but still reopen all of your tabs next time, if you have specified this in Options). But if you try to close Firefox window using the standard Windows shorcut (Alt+F4) or if you click on the close button on its window (top right), the warning will appear.

— I do not know what is the default behaviour of Firefox 3.5, when closing (and I did not test Tab Mix Plus with FF 3.5.x, too). I may update this article in the future, if needed. A reader just confirmed that the bug exists in Firefox 3.5.x, too (thanks, iffi!:-) and that the latest version of Tab Mix Plus fixes the bug in FF 3.5, as it does in FF 3.0. That’s good to know!

— Tab Mix Plus add-on has much more options, but I needed just the warning on closing multiple tabs; feel free to explore all of its other features, though! :-)

I hope this information will be useful to other Firefox users, too!

Also, feel free to leave any comments and notes you may have — I always appreciate constructive feedback and discussion!

UPDATE (2009/08/08): I can confirm that this fix works with latest Firefox 3 (3.0.13) and Firefox 3.5 (3.5.2).


[ optimiced.com is the virtual home of Web & graphic designer Michel Bozgounov | powered by WP & hosted by DreamHost | also available in български ]

0.481 / 26 / 17.5