BotT: Ctrl+Enter on Firefox

The Bug of this Time!
For simplicity’s sake, let’s abbreviate, and wherever you see BotT, you know that’s Shmuel’s “Bug of this Time“.

I picked a bug from the FireFox BugZilla database (BugZilla is a (free) (opensource) (reliable) tool for tracking bugs).
The bug is Bug 233853 – cnn.com, Ctrl+Enter goes to http://www.cnn.com.com/.

This bug is very particular. Let’s first analyze the Bug Description:

User-Agent:
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8

I believe that’s good enough for a Build Identifier. It is the common practice on the DataBase to provide this info (check for yourself). And, from what I’ve seen, no much information on the system OS is given until asked by the programmers.
My belief on where this comes from: From one side, basic information on the environment can be very healthy for bug debugging. But on systems such as this, where the parameteres can change _so_ much from user to user, and people all over the world are running this application with different settings in different operating systems on different computers to do different things… Well, with so much differences, you better leave for the programmer to chose which information he wants :).

* Enter ‘cnn.com’ in the URL field.
* Press CTRL-Enter
* Firefox changes the URL to ‘www.cnn.com.com’.  Firefox prepends ‘www’ and
appends ‘com’ to whatever URL I type.
This does not happen if I provide a protocol or start the URL with ‘www.’

That is a very simple bug, with very simple reproduction steps.
It happens all the time to a lot of people, but Rick was the first to decide and report it.
Anyone can reproduce it from these instructions.

I pressed CTRL-Enter as I’m used to opening links in a background tab in
Mozilla.  I guess Firefox does not yet support opening background tabs.

Reproducible: Always
Steps to Reproduce:
1. Type a URL (sans protocol & ‘www’) in the URL field. (e.g. cnn.com)
2. Press CTRL-Enter
3. Notice Firefox prepends ‘www.’ and appends ‘.com’ to whatever URL you entered
without first attempting to connect to the URL provided.

Actual Results: 
Firefox prepends ‘www.’ and appends ‘.com’ to whatever URL you entered.

Expected Results: 
Firefox should just attempt to connect to the URL as typed.

This is an extension of the first-and-quick reproduction process.
It has additional information (like the background tab statement), a reproduction page that is not specific (in order not to have the discussion limited to cnn.com) and the expected results.

Pretty good!

Wait, if it is pretty good, and simple, and quick, why it is featured as the BotT?
Answer: Take a look at the bug thread — it has 46 posts, since 11/02/2004 until 16/10/2006! In almost three years, the bug was rolling back and forth between sides, until they get to some conclusion.

The culprit is that there is no definition on what the exact behavior should be.
Let’s quote some comments from the bug:

  • Why the change from Ctrl+Enter that’s currently implemented in Mozilla?  ..and what is Ctrl+Enter supposed to do?
  • It’s supposed to pretend to be IE and prepend http://www/. and append .com
  • Just because it’s in IE doesn’t mean we should copy it
  • You Ctrl+Click to open a link in a tab?  What about Ctrl+Enter on a link that has focus in the page?
  • So now we have two choices of behaviour…
  • Maybe add ftp: and https: ?
  • What happens if a site name exists in two or more TLDs?

The moral of this story:
You can not develop what you don’t have defined. More than that, you can not test what was not defined before being programmed.

This is a common disease in Open Source projects, because usually all they have is a good idea, and good programmers. There is no one that writes down exactly what the programmers need to develop and how.
These are one of the most important reasons to have a Benevolent Dictator in the development team of Open Source projects.

Not only Open Source suffers from lack of requirements.
Most software, commercial or not, lacks good requirements in different extents, and usually one is lucky if there is a specific document that defines them.

This feature we are dealing in the bug is a very confusing one, that can be origin to many discussion and polemics.


That was my point. If you already believe me, you can go to the next post.
From now on I will just bring argument and examples.  

For instance, I did a quick search and found this page about auto-completion on IE7. They talk about pressing Ctrl+Enter, Shift+Enter, Shift+Ctrl+Enter, or any of these combinations with Alt.
The shortcuts using Shift or Ctrl+Shift presented in that site do not work on my standard installation of IE7. But Ctrl and Alt do work, so unless there’s a separated checkbox in the IE options for each autocomplete-shortcut, something weird is going on (probably they have a different plugin). One way or another, this is another prove that this feature is vague, and both developing or testing it is painful for its vagueness.

If you use Internet Explorer (I did the switch back from Firefox a while ago), you may want to know that you can change the way Ctrl-Enter behaves in your machine! See this link in the MVPS network for more details.
For FireFox, you can use the ‘browser.fixup.alternate.suffix’ in about:config.

This type of customization is one of the answers found to have a well-defined behavior on the shortcuts. “If the shortcut is not clear, then let each user decide what the command do.”, “If no one is sure what is the best result, let every user decide his own behavior!”. Seems ridiculous, but it is true.

You can see long-lasting threads on requests like this for Mozilla and for FireFox. Threads on this last years and end without resolution.

Leave a Reply