Skip to content

Commit e3825c8

Browse files
flound1129claude
andcommitted
fix(gtk): PathChooser Enter key now confirms dialog and prevents hang
Pressing Enter in a PathChooser widget previously caused a hang when inside dialogs (due to unhandled keypress propagation) and did not confirm the dialog. Both issues are now fixed: Enter is intercepted at the PathChooser level to stop propagation, and the containing dialog is triggered to respond correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 515f7bd commit e3825c8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

deluge/ui/gtk3/path_combo_chooser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,12 @@ def _on_entry_text_key_press_event(self, widget, event):
14091409
if self.auto_completer.auto_complete_enabled:
14101410
self.auto_completer.do_completion()
14111411
return True
1412-
# Show popup when Enter is pressed
1412+
# Show popup when Enter is pressed, unless inside a dialog where
1413+
# Enter should confirm the dialog instead of opening the popup.
14131414
elif key_is_enter(keyval):
1415+
if isinstance(self.get_toplevel(), Gtk.Dialog):
1416+
self.get_toplevel().activate_default()
1417+
return True
14141418
# This sets the toggle active which results in
14151419
# on_button_toggle_dropdown_toggled being called which initiates the popup
14161420
self.button_toggle.set_active(True)

0 commit comments

Comments
 (0)