Bug 64868 - Usability: Address bar in Konqueror should not loose focus while loading
Summary: Usability: Address bar in Konqueror should not loose focus while loading
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 14:37 UTC by Dik Takken
Modified: 2009-02-23 06:56 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dik Takken 2003-09-24 14:37:55 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Compiled From Sources
OS:          Linux

A small annoyance that is present in many web browsers, including konqueror: You open a new konqueror window in the webbrowsing profile, and konqueror starts loading the startup page. While the load is in progress, you start typing the address of the website you want to visit. But while you are typing, the address bar suddenly looses focus when the start page has finished loading. 

Nobody should steal focus from the address bar while typing a URL.
Comment 1 missive 2004-05-07 18:22:17 UTC
I came to report the same bug. It is quite annoying. It is
still present in 3.2.2

Mostly I notice it when starting a new window. It will be coming
up with the home page, but the person wants to go immediately
someplace else instead of the homepage.

The workaround is to click "Stop" before starting to type, but
no one ever does that. They start to type and when the page
loads their selection is lost and the old page URL is put in
the address bar... so they end up with a garbage URL. (these
are mostly people who need to watch the keyboard as they
type ;o)

I could also have the browser start with a blank page, but I
want our home page to be the default start page.
Comment 2 missive 2004-05-07 18:28:49 UTC
I just noticed that this is a "wishlist".
I would call it a bug myself.
Comment 3 missive 2005-09-05 19:39:46 UTC
Could this be taken from "wishlist" and placed in "bugs"?

It is actually a data-loss bug.

A person could have a url almost completely typed in to the address bar and have their typing erased when the page finishes loading.

I think if the text in the address bar has been changed at all from what it was when the page started loading, the text should be left alone when the page finishes loading.
Comment 4 Thiago Macieira 2005-09-07 21:15:04 UTC
Agreed.
Comment 5 Florian Dittmer 2005-12-05 11:10:50 UTC
I just updated from latest KDE 3.4.x to KDE 3.5 and noticed the follwoing change:

In KDE 3.4.x, the Address field was active (focus) after Konqueror start up, so I could immediatly begin typing the URL I want to visit.

In KDE 3.5 now, the Address field is not active after start up anymore. I need to perform one extra mouse-click to the location field in order to be able to type in the URL.

This is really annoying and I hope it will be changed back to the old behaviour.

Thank you

Florian
Comment 6 Tommi Tervo 2005-12-05 11:37:56 UTC
Florian, see http://bugs.kde.org/show_bug.cgi?id=117031.
Comment 7 Lee Braiden 2005-12-06 00:52:42 UTC
Just adding my "me too" on this.  I would also like to see this bug squashed.  It's very annoying to be typing a long url, and, actually, quite happy to have typed a long, complex url quickly, only to have KDE finally load a blank page, and wipe out your hard work as it draws that blank page.

NOTE: on the comment regarding the non-focused address bar in 3.5, I've filed a separate bug report for this: #117766
Comment 8 Lee Braiden 2005-12-06 00:54:15 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 Maciej Pilichowski 2006-03-08 20:49:16 UTC
Let's clarify some things /it's just my opinion/:

a) it should be possible to navigate on loading page -- so after confirming the url address the main page should get the focus
b) if url changed /even if page is 100%/ it is a sign that the focus should stay in location-box 
c) after confirming the address /pressing enter/ and while _connecting_ the focus should stay in location box because it is possible there is a typo /all http error-pages should be treated as not loaded pages/, however when connection is _established_ and page is _loading_ -- see (a)

If there is no agreement on those, I think all those behaviors should be set as an options in Konqueror settings.


Comment 10 klaatu 2008-05-04 19:09:29 UTC
This appears to have been fixed because I cannot replicate it in 4.0.3
Comment 11 FiNeX 2008-05-06 13:51:46 UTC
I can confirm which konqueror 4 seems be better than 3.5.x about this behavior.
Comment 12 Florian Loitsch 2008-07-03 00:06:33 UTC
Konqueror 4 behaves *much* better, but the problem is still there. You can easily reproduce it: Type http://192.168.1.3 (or any other local address which should *not* respond). The timeout will take some time. During all this time you can type a new address (but do not submit). When the timeout occurs your newly typed address will be replaced with the original address.
In general Konqueror 4 does this extremely fast, though. (which was not the case in Konqeror 3.5). It seams as if Konqueror 4 does this once a reply arrives.
Comment 13 Jaime Torres 2008-07-12 11:19:04 UTC
Confirmed the behavior of comment #12 in konqueror 4.1 rc1.
Comment 14 David Faure 2008-09-16 17:59:50 UTC
The focus is moved to the view so that the arrow keys (among others) work.
But indeed we could detect "a key has been typed in the location bar after the URL started to load" and skip the setFocus call in that case.
Comment 15 David Faure 2009-02-17 18:15:15 UTC
Oh, OK, comment #12 is more complex than that, it's related to "error:/" urls (i.e. displaying errors inside the konqueror window). When the timeout happens and we open that URL, KHTML sets the location bar URL.
But it's not specific to error urls, I found another case where the bug is still reproduceable: typing fast
   www.ibm.fr, Enter, F6, Delete, www.kde.org
The redirection to www.ibm.com/fr/fr happens after I edited the location bar url, and overwrites www.kde.org. I see that firefox doesn't touch the location bar when trying this testcase. Fixed: now konqueror doesn't anymore (fix will be in 4.2.1).

I'll close this bug, although it ended up having very little to do with "losing focus" anymore, it became about losing typed text ;-)
Comment 16 David Faure 2009-02-17 18:32:52 UTC
SVN commit 927496 by dfaure:

Backport: Don't overwrite the URL typed by the user (e.g. upon redirection) if he/she had time to type while the url was loading.
Testcase in bug 64868 comments 12 and 15.
BUG: 64868


 M  +5 -1      konqmainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=927496
Comment 17 Marcel Partap 2009-02-23 06:56:42 UTC
kewl! just noticed reading the svn log, thx for the change david. konqueror is applied intelligent design theory ;o)