[TIMOB-16535] MobileWeb: Button.js issue with missing font property and inconsisent treatment of whitespace characters in title
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-31T22:36:47.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | 2014 Sprint 07, 2014 Sprint 07 Tooling, Release 3.3.0 |
Components | MobileWeb |
Labels | module_button, qe-testadded |
Reporter | Andrew Greenstreet |
Assignee | Chris Barber |
Created | 2014-02-24T17:54:57.000+0000 |
Updated | 2014-06-19T12:44:43.000+0000 |
Description
On Mobile Web Buttons have two deficiencies.
1. Buttons are missing a font property, so you can't change the font size or face.
2. Buttons do not treat leading spaces in the "title" the same as other platforms. HTML ignores the spaces, so button.title = " Some Text" would be treated as if it were button.title = "Some Text". This is not true on Android or iOS
I'm combining these as I have a fix I'll submit as a pull request.
Fixed in: https://github.com/appcelerator/titanium_mobile/pull/5370
Thank you so much for submitting this pull request. In order for us to evaluate this pull request, we need a simple runnable test case illustrating the current issue so that we then can use the PR to verify that the issue has been fixed indeed. Again, we appreciate your effort and hard work.
Moving this ticket to engineering to evaluate this PR in the context of this ticket.
[~andrew@gstreetmedia.com] Why would you have whitespace at the beginning of a line of text in a button? Are you doing this for alignment, perhaps when the button has an icon?
That is exactly the reason why. I only offered this up for parity, as in Android or iOS if you add whitespace characters to a button with an icon, the text will shift right. HTML will ignore the double whitespace and treat it as a single space.
[~andrew@gstreetmedia.com] Hmm, ok. I'm fine with inserting
, but we may also want to increase the default padding.3_2_X_hybrid pull request: https://github.com/appcelerator/titanium_mobile/pull/5561
Verified fixed on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201405121247 Titanium SDK, build: 3.3.0.v20140515133312 Titanium CLI, build: 3.3.0-dev Alloy: 1.4.0-alpha Leading whitespace is displayed correctly. Fonts are also recognised, chrome not displaying Helvetica-Light due to the browser not supporting it. Firefox successfully displays the font though. Closing.