From 530adfcb634ea1ac3a44bf332059b23bec3f67f5 Mon Sep 17 00:00:00 2001 From: Zhongwei Yao Date: Wed, 8 Jan 2025 21:39:07 -0800 Subject: [PATCH] Enable tap to close in the input dialog Besides clicking "Cancel" button, tapping area off InputDialog window also closes this dialog. Refer InputDialog:onCloseDialog() and InputDialog:onTap() for details. --- dialogs.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dialogs.lua b/dialogs.lua index 16911d2..3345ae0 100644 --- a/dialogs.lua +++ b/dialogs.lua @@ -83,6 +83,7 @@ local function showChatGPTDialog(ui, highlightedText, message_history) buttons = { { text = _("Cancel"), + id = "close", callback = function() UIManager:close(input_dialog) end @@ -170,4 +171,4 @@ local function showChatGPTDialog(ui, highlightedText, message_history) UIManager:show(input_dialog) end -return showChatGPTDialog \ No newline at end of file +return showChatGPTDialog