Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-667

Alloy: having a button (one for each platform) with same ID causes Ti.Contacts.showContacts() weirdness

    Details

      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

          Activity

            People

            • Assignee:
              tlukasavage Tony Lukasavage
              Reporter:
              taskle David Murray
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration