After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 488680 - Deletes what I'm typing in the location bar while I'm typing
Deletes what I'm typing in the location bar while I'm typing
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Interface
2.20.x
Other Linux
: Normal minor
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-20 17:43 UTC by trondsg
Modified: 2012-06-05 14:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
proposed patch (3.69 KB, patch)
2008-01-31 18:35 UTC, Cosimo Cecchi
committed Details | Review

Description trondsg 2007-10-20 17:43:24 UTC
If the location changes while I'm typing something in the location bar what I'm typing is simply erased and replaced with the new url, and the location bar loses focus.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2007-10-22 18:15:18 UTC
It doesn't happen here, can you give an example of this?
Comment 2 trondsg 2007-10-22 19:24:15 UTC
1. Go here: http://www.willhostforfood.com/files/52612/test.html
2. Press Ctrl+L
3. Type "www.google.com" (without the quotes, don't press enter)
4. Wait, keep the focus in the location bar
5. Suddenly the text is replaced with http://www.indiana.edu/~smithclas/l200/

The text in the location bar should be programatically changed while the user is editing it (i.e. it has focus).

This sounds like a non-issue until you set www.google.com as your homepage and Google thinks it's nice to provide you with a national version of the page and redirects you to that. Then EVERY time you open a new tab to type a new url it gets erased somewhere in the middle. That's not acceptable.
Comment 3 Reinout van Schouwen 2007-11-26 20:36:48 UTC
The easy way around the use case you give is to type the address first, and then press Ctrl+Enter to open it in a new tab. No redirects involved.

However in the more generic case I can see that it makes sense that the address field is not set to reflect the current page URL as long as it has focus, no matter if the page is redirected.
Comment 4 Cosimo Cecchi 2008-01-31 18:35:23 UTC
Created attachment 104120 [details] [review]
proposed patch

Attached patch solves this bug (after applying the patch from bug #513345).
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2008-05-18 23:09:40 UTC
Seems good to me.
Comment 6 Cosimo Cecchi 2008-05-19 19:44:31 UTC
I committed this to trunk (apart from some superfluous whitespace changes and the removal of the LOG () line), thanks Diego for the review.
Keeping the bug open so Christian can eventually backport the patch to gnome-2-22 if needed.

------------------------------------------------------------------------
r8239 | cosimoc | 2008-05-19 21:36:47 +0200 (Mon, 19 May 2008) | 4 lines

Block updates of the location entry while it is keyboard-focused.
This is to avoid deletion of the text while the user is typing.
Close bug #488680.
Comment 7 Christian Persch 2008-05-23 21:03:50 UTC
+	gboolean sync_address_is_blocked;

Make that guint : 1 please.

Maybe I'm missing something but this patch seems overly complicated; can't we just check in sync_address if the entry has the focus and just return then without update?
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2008-05-24 13:13:58 UTC
Well on a quick test, using GTK_WIDGET_HAS_FOCUS() worked except when the url was selected. 
So if you type gmail.com, enter, and then control+l, type something to replace gmail.com it will work as expected.
If you type gmail.com, enter, and then control+l, it will exhibit the 'broken' behaviour.
Comment 9 Christian Persch 2008-05-25 20:04:40 UTC
Hmm not sure I understand the distinction here... ctrl-L puts the focus to the url bar, so what's different between having it all selected and just typing away? This shouldn't make any diff to HAS_FOCUS()... maybe it's simply the gecko focus bug again?
Comment 10 Christian Persch 2008-06-30 18:25:36 UTC
Not going to happen for 2.22.x.
Comment 11 Claudio Saavedra 2012-05-10 07:30:48 UTC
So this patch landed in master 5 years ago but the bug is still open?

commit ef289f5590cb8d65361e022a1e8af73a84602250
Author: Cosimo Cecchi <cosimoc@src.gnome.org>
Date:   Mon May 19 19:36:47 2008 +0000

    Block updates of the location entry while it is keyboard-focused.
    This is to avoid deletion of the text while the user is typing.
    Close bug #488680.
    
    svn path=/trunk/; revision=8239
Comment 12 Claudio Saavedra 2012-06-05 14:17:51 UTC
I'm obsoleting this as 1) the patch was applied anyway eons ago and 2) I'm proposing the removal of the implemented solution as it seems innecessary as per bug 675804.