summaryrefslogtreecommitdiffstats
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f8a1345576..fa8017a41b 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -2008,14 +2008,14 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
}
// If a modifier has been pressed, and nothing else, return.
- if (k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT || k->get_keycode() == Key::META) {
+ if (k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT || k->get_keycode() == Key::META || k->get_keycode() == Key::CAPSLOCK) {
return;
}
_reset_caret_blink_timer();
// Allow unicode handling if:
- // * No Modifiers are pressed (except shift)
+ // * No modifiers are pressed (except Shift and CapsLock)
bool allow_unicode_handling = !(k->is_command_or_control_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed());
// Check and handle all built in shortcuts.
@@ -3035,6 +3035,11 @@ bool TextEdit::is_text_field() const {
}
Variant TextEdit::get_drag_data(const Point2 &p_point) {
+ Variant ret = Control::get_drag_data(p_point);
+ if (ret != Variant()) {
+ return ret;
+ }
+
if (has_selection() && selection_drag_attempt) {
String t = get_selected_text();
Label *l = memnew(Label);