summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/TextEditor.cpp')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index dc9a006017..3d5352f2d8 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -775,6 +775,9 @@ void TextEditor::select_all()
void TextEditor::insert_emoji()
{
+ if (!accepts_emoji_input() || window()->blocks_emoji_input())
+ return;
+
auto emoji_input_dialog = EmojiInputDialog::construct(window());
emoji_input_dialog->set_window_mode(GUI::WindowMode::Passive);
if (emoji_input_dialog->exec() != EmojiInputDialog::ExecResult::OK)
@@ -1722,6 +1725,8 @@ void TextEditor::context_menu_event(ContextMenuEvent& event)
if (is_displayonly())
return;
+ m_insert_emoji_action->set_enabled(accepts_emoji_input() && !window()->blocks_emoji_input());
+
if (!m_context_menu) {
m_context_menu = Menu::construct();
m_context_menu->add_action(undo_action());