Commit da425e41 authored by Philipp Hörist's avatar Philipp Hörist

ChatControlBase: Fix infinite recursion

If the input textview is not sensitive it can’t get the focus. In that case propagate_key_event() would send the event again to the conversation textview. This would mean a recursion.

Fixes #10259
parent a4f46f62
Pipeline #6254 passed with stages
in 3 minutes and 35 seconds
......@@ -266,6 +266,12 @@ class ChatControlBase(ChatCommandProcessor, CommandTools, EventHelper):
if textview.get_buffer().props.has_selection:
return Gdk.EVENT_PROPAGATE
if not self.msg_textview.get_sensitive():
# If the input textview is not sensitive it can’t get the focus.
# In that case propagate_key_event() would send the event again
# to the conversation textview. This would mean a recursion.
return Gdk.EVENT_PROPAGATE
# Focus the Message Input and resend the event
textview.unselect()
self.msg_textview.grab_focus()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment