Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3005] OptionDialog event click return strange datas when pressing back button in Android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2011-09-02T08:33:27.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, bug, optiondialog
ReporterAdrien Mas
AssigneeTony Guntharp
Created2011-08-10T08:06:20.000+0000
Updated2016-03-08T07:48:01.000+0000

Description

A simple code to reproduce the bug : var dialog = Titanium.UI.createOptionDialog({ options : ['hello', 'world', 'how', 'do', 'you', 'do'], selectedIndex : 1 }); dialog.addEventListener('click',function(e) { Ti.API.info(e.index); }); When pressing the hardware back button, console log displays : [INFO] [33940,57185] -2.68435457E8 Where -2.68435457E8 is the value of e.index. I don't think click event should even trigger in this case.

Comments

  1. Paul Dowsett 2011-08-10

    Thank you for raising this ticket. In order to progress it, please add the missing information in the format and places requested in the guidelines at [Jira Ticket Checklist](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist). For instance, in the environment field: * *Titanium SDK version:* number, build date and build hash, copied and pasted from the console at application launch * *Host Operating System:* OSX x.x, Windows x, Ubuntu x.x * *Titanium Studio version:* copied and pasted from Help / About In the description: * *a link to the Q&A question*, where you asked the community to verify the observed behavior * *a* *[simple usecase](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases)**:* working code that demonstrates issue, placed within a \{code\} wiki markup block. Check that it runs correctly without any modifications when pasted into a blank app.js file Many thanks in advance
  2. Adrien Mas 2011-08-11

    Here are the missing elements, Environment : - Titanium SDK version : 1.7.1 (06/21/11 14:28 1293a6d) - Host Operating System : Mac OS X Server version 10.6.8 - not (yet) using Titanium Studio - Q&A question : http://developer.appcelerator.com/question/124042/bug-report-optiondialog-event-click-return-strange-datas-when-pressing-back-button-in-android
  3. Paul Dowsett 2011-08-11

    Thank you for the information, but would you add it to the body of the ticket, please? Also, please add a usecase that runs without modification. Then I can move it to the correct project. Thanks
  4. Paul Dowsett 2011-09-02

    Adrien, as there has been no response, I am closing this ticket. You are welcome to open it again, if you are willing to improve it as per my previous request. Also, the code does not run. Please see [Creating Good Use-cases](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases) and the guidelines in the [Jira Ticket Checklist](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist). Many thanks
  5. Paul Dowsett 2011-10-07

    Closing due to inactivity.

JSON Source