From 8b4dced3cd7ed856e21e3fe6cf90cdcd54b4178a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Sep 2019 18:28:23 +0200 Subject: [PATCH] Do not consider readonly/non editable widget as focusable issue8475 review277751002 --- tryton/common/focus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/common/focus.py b/tryton/common/focus.py index b41ed5a79d..21c8ad0e1a 100644 --- a/tryton/common/focus.py +++ b/tryton/common/focus.py @@ -54,7 +54,8 @@ def get_focus_children(widget): def find_focusable_child(widget): if not widget.get_visible(): return None - if widget.get_can_focus(): + if (widget.get_can_focus() + and (not isinstance(widget, Gtk.Entry) or widget.props.editable)): return widget for child in get_focus_children(widget): focusable = find_focusable_child(child)