GNOME Bugzilla – Bug 734952
Always update location entry address if unfocused
Last modified: 2014-08-31 14:06:07 UTC
See patch description. I'm curious to hear opinions on removing location enttry locking entirelly.
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.
Review of attachment 283661 [details] [review]: Ok
Attachment 283661 [details] pushed as 64451de - Always update location entry address if unfocused
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. :/
Created attachment 284466 [details] [review] Revert "Always update location entry address if unfocused" This reverts commit 64451de8f7c611d50a5200e89278dc1c6c08c4ca.
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.
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.
*** Bug 732679 has been marked as a duplicate of this bug. ***
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 on attachment 284467 [details] [review] Remove most location entry locking Carlos doesn't like this, so we'll probably keep location entry locking.
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.
Attachment 284918 [details] pushed as 27867c0 - Update location entry address when title box mode changes