[TIMOB-6901] API: UI - provide optionDialog cancel event for when no button is selected
GitHub Issue | n/a |
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-01-03T03:34:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | TiAPI |
Labels | n/a |
Reporter | Ivan Skugor |
Assignee | Maggie Chen |
Created | 2011-12-23T04:10:18.000+0000 |
Updated | 2018-01-03T03:34:59.000+0000 |
Description
Problem
Currently the way to check whether the hardware back button has been pressed when an optionDialog has been displayed is verbose. Also, the action of clicking this button means the same as clicking the optionDialog's cancel button, so it would be beneficial to have a more literal event to handle the situation is canceled, regardless of whether that is by using the hardware back button or clicking the cancel button of the optionDialog.
Request / Solution
Redevelop "cancel" functionality of optionDialog so that it supports new "cancel" event instead of "cancel" property in "click" event, to handle situations where no option is selected.
Justification
Convenience and shorter JS code
The advantage is that we will be able to do action when both "cancel" option is selected and hardware back-button is pressed, and on the other hand in "click" event listener we won't have to check if "cancel" opinion was clicked to do no action (so, "cancel" option would not produce "click" event).
Comments
JSON Source
Ivan If I understand this request correctly, while I admit this functionality would be convenient, the functionality is already available in Titanium to achieve this and the code is quite trivial. With this in mind, I will personally ask the engineering team if they think this is worthwhile, and move it across to the main project if they do. I will let you know the response. Thanks for the suggestion.