From: Vladislav Timonin timoninvlad@yandex.ru
If the previously focused view was destroyed, GetFocus will return NULL.
Focus the new view to be able to Backspace multiple times. --- dlls/comdlg32/itemdlg.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 761587ca6b9..2ca97bbc6f1 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -3442,6 +3442,16 @@ static HRESULT WINAPI IExplorerBrowserEvents_fnOnViewCreated(IExplorerBrowserEve { FileDialogImpl *This = impl_from_IExplorerBrowserEvents(iface); TRACE("%p (%p)\n", This, psv); + + if (GetFocus() == NULL) + { + /* previous view was probably focused, focus the new view */ + HWND view_hwnd; + HRESULT hr = IShellView_GetWindow(psv, &view_hwnd); + if (SUCCEEDED(hr)) + SetFocus(view_hwnd); + } + return S_OK; }