Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5432] iPad OptionDialog does not give focus back to the window on cancel

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNot Our Bug
Resolution Date2017-12-09T22:14:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsoptionaDialog
ReporterJoshua Green
AssigneeShak Hossain
Created2017-12-08T14:46:22.000+0000
Updated2017-12-09T22:14:54.000+0000

Description

When canceling an OptionDialog on iPad it does not give back focus to the window therefore messing up navigation using the NavigationWindow. On iPhone canceling an OptionDialog will give back focus to the window and I have no issues. Blur and Focus events on the windows confirm this behavior.

Comments

  1. Sharif AbuDarda 2017-12-08

    Hello, Please share a sample reproducible code for us to test. Thanks.
  2. Hans Knöchel 2017-12-09

    Although it may not be the answer you are looking for, we are not doing anything special for the option-dialog regarding blur and focus events. It looks like Apple decided to now fire the delegates (viewWillAppear and viewWillDisappear) for option-dialogs in popovers like on the iPad. One reason might be that they technically allow you to provide pass-through views that can be used even is the option dialog is shown. This is not available on the iPhone, so it's presented modally instead of the current context like on the iPad. For a solution and way cleaner alternative, listen to the "click" event of the dialog, which will also be triggered if the user taps outside the option-dialog. See a similar (native) discussion [here](https://stackoverflow.com/a/25469305/5537752).

JSON Source