[gnome-maps/gnome-3-38] sidebar: Only focus on next route entry when empty
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-38] sidebar: Only focus on next route entry when empty
- Date: Sat, 16 Jan 2021 09:00:37 +0000 (UTC)
commit 333bc2c7e6b1cf68a59eb88407437b8b8cce3592
Author: Marcus Lundblad <ml update uu se>
Date: Sat Jan 16 09:55:20 2021 +0100
sidebar: Only focus on next route entry when empty
Only automatically set focus on the next route entry
when selecting a place and the next one is not set
with a place (is empty).
This fixes a race-condition-like bug when dragging
markers around (setting raw coordinates) in some
cases. It also make more sense only to autofocus
on an empty entry leading the user into searching
for a "to" place.
Fixes #329
src/sidebar.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index d3f84316..1821218a 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -257,7 +257,8 @@ var Sidebar = GObject.registerClass({
let nextPlaceEntry =
this._entryList.get_row_at_index(index + 1).get_child().entry;
- nextPlaceEntry.grab_focus();
+ if (!nextPlaceEntry.place)
+ nextPlaceEntry.grab_focus();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]