Fix problem when user presses "previous" button on iOS software keyboard and focus goes from Dialog back to main page.   But take care not to break context menus on the Dialog: ignore focus events that occur on those menus.  Fixes #15370, refs #16550 !strict.