diff options
Diffstat (limited to 'webkit/tools/test_shell/text_input_controller.cc')
-rw-r--r-- | webkit/tools/test_shell/text_input_controller.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/text_input_controller.cc b/webkit/tools/test_shell/text_input_controller.cc index 8dfb9a1..8ab7576 100644 --- a/webkit/tools/test_shell/text_input_controller.cc +++ b/webkit/tools/test_shell/text_input_controller.cc @@ -52,8 +52,13 @@ void TextInputController::insertText( if (!main_frame) return; - if (args.size() >= 1 && args[0].isString()) + if (args.size() >= 1 && args[0].isString()) { + if (main_frame->hasMarkedText()) { + main_frame->unmarkText(); + main_frame->replaceSelection(WebString()); + } main_frame->insertText(WebString::fromUTF8(args[0].ToString())); + } } void TextInputController::doCommand( |