Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11868

MobileWeb: Background Color and BackgroundSelectedColor of a button do not work

    Details

      Description

      When a button's Background Color is set it only stays for the first click after that click it just becomes white even if the backgroundSelectedColor is specified. It works fine on Android.

      Ti.UI.backgroundColor = 'blue';
      var win = Ti.UI.createWindow();
       
      var btn = Titanium.UI.createButton({
      	title : "test",
      	height : 100,
      	width : 200,
      	backgroundColor : 'green',
      	backgroundSelectedColor : 'red',
      });
       
      win.add(btn);
       
      win.open();
       
      
      

      Steps to reproduce:

      1. Load the app.js
      2. Run the app in the mobile web preview in Browser
      3. Once the page is loaded, The button is green
      4. Click on the button.
      5. It loses green color and never takes black color (backgroundSelectedColor)
      6. Now try running it on the android emulator

      Expected Result: It should show up the black color when clicked on it. like on Android.

      Actual Result: It does not behave similar to android.

      If the background color is only supposed to work this way (only stay till the first click), then there should not be a backgroundColor property for buttons on mobileWeb similar to iOS.

        Attachments

          Activity

            People

            • Assignee:
              csullivan Christian Sullivan
              Reporter:
              aakkinepally Amuktha Akkinepally
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-15025
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration