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 734952 - Always update location entry address if unfocused
Always update location entry address if unfocused
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 732679 (view as bug list)
Depends on: 732713
Blocks:
 
 
Reported: 2014-08-17 15:40 UTC by Michael Catanzaro
Modified: 2014-08-31 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Always update location entry address if unfocused (1.80 KB, patch)
2014-08-17 15:40 UTC, Michael Catanzaro
committed Details | Review
Revert "Always update location entry address if unfocused" (866 bytes, patch)
2014-08-26 01:13 UTC, Michael Catanzaro
committed Details | Review
Remove most location entry locking (4.64 KB, patch)
2014-08-26 01:13 UTC, Michael Catanzaro
none Details | Review
Update location entry address when title box mode changes (2.13 KB, patch)
2014-08-31 01:23 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2014-08-17 15:40:20 UTC
See patch description. I'm curious to hear opinions on removing location enttry locking entirelly.
Comment 1 Michael Catanzaro 2014-08-17 15:40:22 UTC
Created attachment 283661 [details] [review]
Always update location entry address if unfocused

ephy-location-controller has some suspect code to lock the location
entry, preventing it from being changed when the current web page
changes. This is contrary to the behavior of Firefox, which immediately
updates the location entry when the page changes. I think Firefox's
behavior is less confusing, since it ensures the correct address is
always displayed, but I guess the intent of Epiphany's behavior is to
not change the address if the user is currently typing one.

The problem occurs when the location entry is focused while a new page
is loading: then the old address remains in the location entry, while
the title box subtitle gets updated to the new address. Fix this desync
by always updating the location entry address when the location entry is
unfocused. This means the location entry will only have the incorrect
address as long as it is visible, and will be updated to the correct
address when the title box is shown.

We might additionally want to remove all the locking code so that the
address is always immediately updated.
Comment 2 Carlos Garcia Campos 2014-08-25 07:37:48 UTC
Review of attachment 283661 [details] [review]:

Ok
Comment 3 Michael Catanzaro 2014-08-25 14:14:38 UTC
Attachment 283661 [details] pushed as 64451de - Always update location entry address if unfocused
Comment 4 Michael Catanzaro 2014-08-26 00:36:19 UTC
Aaand this makes it impossible to use the context menu to cut/copy/paste, since the location entry loses focus to the context menu when you right click. :/
Comment 5 Michael Catanzaro 2014-08-26 01:13:53 UTC
Created attachment 284466 [details] [review]
Revert "Always update location entry address if unfocused"

This reverts commit 64451de8f7c611d50a5200e89278dc1c6c08c4ca.
Comment 6 Michael Catanzaro 2014-08-26 01:13:57 UTC
Created attachment 284467 [details] [review]
Remove most location entry locking

We currently lock the location entry to prevent it from changing on the
user if he currently has it focused, since he might be typing. But this
causes the location entry to desync with the current page if the entry
is focused while the page is loading. Remove this behavior to match
other major browsers and ensure the user is always shown the right URL
for the page, even when the entry is focused.

We still need some locking to prevent recursive updates between the
location controller and location entry, but most of it can go.
Comment 7 Michael Catanzaro 2014-08-26 01:17:10 UTC
An alternative would be to add another public function to EphyLocationController to allow EphyTitleBox to manually sync the location controller with the location entry when the title box state changes. But I don't like the location entry locking: its only benefit (locking the location entry from updates) necessitates that the user is shown the wrong URI. Firefox doesn't do this.
Comment 8 Michael Catanzaro 2014-08-27 23:55:01 UTC
*** Bug 732679 has been marked as a duplicate of this bug. ***
Comment 9 Michael Catanzaro 2014-08-29 13:20:27 UTC
Comment on attachment 284466 [details] [review]
Revert "Always update location entry address if unfocused"

Attachment 284466 [details] pushed as 454b819 - Revert "Always update location entry address if unfocused"
Comment 10 Michael Catanzaro 2014-08-29 14:14:26 UTC
Comment on attachment 284467 [details] [review]
Remove most location entry locking

Carlos doesn't like this, so we'll probably keep location entry locking.
Comment 11 Michael Catanzaro 2014-08-31 01:23:28 UTC
Created attachment 284918 [details] [review]
Update location entry address when title box mode changes

Otherwise, we get stuck displaying an old address if the page changes
while the entry is locked.
Comment 12 Michael Catanzaro 2014-08-31 14:06:05 UTC
Attachment 284918 [details] pushed as 27867c0 - Update location entry address when title box mode changes