diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 887dfda60c..c3dcdaa122 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -185,6 +185,7 @@ struct IConsoleWindow : Window ~IConsoleWindow() { _iconsole_mode = ICONSOLE_CLOSED; + _video_driver->EditBoxLostFocus(); } /** diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index afb37bd393..a9f3981d1d 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -579,6 +579,8 @@ void VideoDriver_Cocoa::EditBoxLostFocus() [ [ NSInputManager currentInputManager ] markedTextAbandoned:_cocoa_subdriver->cocoaview ]; } } + /* Clear any marked string from the current edit box. */ + HandleTextInput(NULL, true); } /**