diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 92b54eef21f..db0c1f17b0e 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1132,6 +1132,7 @@ Set the type of caret to draw. + If [code]true[/code], a right-click displays the context menu. diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a7cd18e1a8f..6e316714754 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -539,7 +539,6 @@ void TextEdit::_notification(int p_what) { _update_scrollbars(); RID ci = get_canvas_item(); - RenderingServer::get_singleton()->canvas_item_set_clip(get_canvas_item(), true); int xmargin_beg = theme_cache.style_normal->get_margin(SIDE_LEFT) + gutters_width + gutter_padding; int xmargin_end = size.width - theme_cache.style_normal->get_margin(SIDE_RIGHT); @@ -8022,5 +8021,6 @@ TextEdit::TextEdit(const String &p_placeholder) { set_placeholder(p_placeholder); + set_clip_contents(true); set_editable(true); }