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

MobileWeb: height values is displayed as "auto" when button, styles property set as height: Ti.UI.SIZE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.3.0
    • Fix Version/s: None
    • Component/s: MobileWeb
    • Labels:
    • Environment:

      Description

      height values is displayed as "auto" when button, styles properties set as height: Ti.UI.SIZE.

      Steps to reproduce:
      index.js:

      $.index.open();
       
      var style = require('alloy/styles/index');
      var i, len;	
      for (i = 0, len = $.index.children.length; i < len; i++) {
      	var child = $.index.children[i];
      	child.addEventListener('click', function(e) {
      		var id = e.source.id;
      		_.each(style, function(o) {
      			if (o.key === id && o.isId) {
      				// print each style that applies by ID to the source
      				alert(JSON.stringify(o));
      			}
      		});
      	});
      }
      

      index.xml:

      <Alloy>
      	<Window>
      		<Label id="info">Click anything to see its ID style entry</Label>
      		<Button id="button1">button1</Button>
      		<Button id="button2">button2</Button>
      		<Button id="button3">button3</Button>
      	</Window>
      </Alloy>
      

      index.tss:

      "#index": {
      	layout: 'vertical'
      }
      "#button1": {
      	height: '70dp',
      	width: '250dp',
      	borderRadius: 8,
      	borderWidth: 2,
      	borderColor: '#500'
      }
       
      "#button2": {
      	width: '100dp',
      	height: Ti.UI.SIZE
      }
       
      "#button3": {
      	height: '40dp',
      	width: '200dp',
      	borderRadius: 32,
      	borderWidth: 1,
      	borderColor: '#0f0'
      }
      

      1. Run the sample test code
      2. Click on the button2.

      Expected Result:
      1. alert must pop up with height value as "SIZE"

      Actual Result:
      1. alert must pop up with height value as "auto"

      Note:
      This is not a regression. Occurs with alloy@1.3.1 also
      Working fine for normal iOS and Android project.

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              pagarwal Priya Agarwal
              Reviewer:
              Wei Kong (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code