diff --git a/frameworks/core/components_ng/pattern/rich_editor/rich_editor_pattern.cpp b/frameworks/core/components_ng/pattern/rich_editor/rich_editor_pattern.cpp index c751b218931a879fe2039b715128191b877bd2a0..4181b930eb50f2fa8a5060975a81b89792f34c12 100644 --- a/frameworks/core/components_ng/pattern/rich_editor/rich_editor_pattern.cpp +++ b/frameworks/core/components_ng/pattern/rich_editor/rich_editor_pattern.cpp @@ -2296,8 +2296,6 @@ bool RichEditorPattern::OnKeyEvent(const KeyEvent& keyEvent) keyEvent.pressedCodes[0] == KeyCode::KEY_SHIFT_RIGHT) && visibilityCode.length() > 1) { InsertValue(visibilityCode.substr(1, 1)); - } else { - InsertValue(visibilityCode.substr(0, 1).c_str()); } return true; }