[Bug] - Error when setting a font on TabView on iOS
See original GitHub issueIssue: After upgrading to {N} 2.5 and then setting a custom font (family or size) using CSS on a TabView I get the following error in the console using the iOS simulator:
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'tabBar.items.count')
It seems to be working when setting the font-family directly on the TabView (just shows the error in the console). However when I set the custom font on the Page instead of directly on the TabView the whole TabView is blank.
This only applies to iOS. Works fine on the Android emulator.
Example:
Tried this with {N} 2.5 on the default ng
template using tns create component-core --ng
and then modifying the default items.component.html with the following template.
items.component.html
<ActionBar title="TestTitle" style.backgroundColor="#149718"></ActionBar>
<TabView sdkExampleTitle sdkToggleNavButton>
<StackLayout *tabItem="{title: 'Overview'}" >
<Label text="Test Label"></Label>
</StackLayout>
</TabView>
app.css
TabView {
background-color: #F3F3F3;
font-family: 'Courier'; // Enabling this (without the font-family defined on the Page) results in just the console error
}
Page {
font-family: 'Courier'; // Enabling this results in the error and shows a blank TabView
}
Versions: Nativescript version: 2.5 Nativescript-angular version: 1.4.0 (also tried the next version: 1.4.1-2017-01-31-1230)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
@bsnelder, @codeback, @pap5508,
We just published
tns-core-modules@2.5.1
which addresses the issue.I moved the issue to the respective repo.
This issue was moved to NativeScript/NativeScript#3646