[ALOY-667] Alloy: having a button (one for each platform) with same ID causes Ti.Contacts.showContacts() weirdness
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-21T19:58:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.3.0, 2014 Sprint 02 |
Components | n/a |
Labels | alloy, contacts, qe-closed-3.3.0 |
Reporter | David Murray |
Assignee | Tony Lukasavage |
Created | 2013-05-22T20:00:34.000+0000 |
Updated | 2014-06-19T09:21:03.000+0000 |
Description
*Problem* If you have an alloy view with two buttons with the same ID, specifically for the use case of platform-specific buttons, e.g.:
<Button id="btnFoo" title="Show Contacts" platform="ios" onClick="exports.showContacts" />
<Button id="btnFoo" title="Show Contacts" platform="android" onClick="exports.showContacts" />
And you open this window, then you open the contacts window via Ti.Contacts.showContacts() a couple unusual behaviors occur:
1. clicking "Cancel" triggers the cancel event but the window itself doesn't close
2. clicking a row triggers the row's click event but the window itself doesn't close
3. when the search bar has focus, typing doesn't have text show up in the window.
If the button doesn't have an ID on it, this behavior doesn't occur.
*Steps to reproduce*
1. Create a new standard Alloy project and drop in the app folder contents from the zip
2. Run on iOS 6 simulator and observe behavior described above
3. Try changing the id of one of the buttons to something else, observe that all the behavior described above is fixed
Attachments
File | Date | Size |
---|---|---|
app.zip | 2013-05-22T20:00:34.000+0000 | 3687266 |