Merge pull request #582 from NativeScript/html-view-br

br not handled properly by HtmlView + functional test
This commit is contained in:
Vladimir Enchev
2015-08-13 17:01:19 +03:00
4 changed files with 12 additions and 1 deletions

View File

@ -150,6 +150,7 @@
<TypeScriptCompile Include="apps\tests\xml-declaration\inherited-base-page.ts" /> <TypeScriptCompile Include="apps\tests\xml-declaration\inherited-base-page.ts" />
<TypeScriptCompile Include="apps\tests\xml-declaration\inherited-page.ts" /> <TypeScriptCompile Include="apps\tests\xml-declaration\inherited-page.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\pages\handlers.ts" /> <TypeScriptCompile Include="apps\ui-tests-app\pages\handlers.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\pages\html-view.ts" />
<TypeScriptCompile Include="ui\animation\animation.d.ts" /> <TypeScriptCompile Include="ui\animation\animation.d.ts" />
<TypeScriptCompile Include="ui\animation\animation-common.ts"> <TypeScriptCompile Include="ui\animation\animation-common.ts">
<DependentUpon>animation.d.ts</DependentUpon> <DependentUpon>animation.d.ts</DependentUpon>
@ -939,6 +940,7 @@
<Content Include="apps\ui-tests-app\pages\background.xml" /> <Content Include="apps\ui-tests-app\pages\background.xml" />
<Content Include="apps\ui-tests-app\pages\circle.xml" /> <Content Include="apps\ui-tests-app\pages\circle.xml" />
<Content Include="apps\ui-tests-app\pages\handlers.xml" /> <Content Include="apps\ui-tests-app\pages\handlers.xml" />
<Content Include="apps\ui-tests-app\pages\html-view.xml" />
<Content Include="apps\ui-tests-app\pages\i86.xml" /> <Content Include="apps\ui-tests-app\pages\i86.xml" />
<Content Include="apps\template-blank\app.css" /> <Content Include="apps\template-blank\app.css" />
<Content Include="apps\template-hello-world\app.css" /> <Content Include="apps\template-hello-world\app.css" />
@ -1932,7 +1934,7 @@
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties> </WebProjectProperties>
</FlavorProperties> </FlavorProperties>
<UserProperties ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2linear-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" /> <UserProperties ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2linear-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
</Project> </Project>

View File

@ -0,0 +1,5 @@
export function pageLoaded(args) {
var page = args.object;
page.bindingContext = { html: "one<br>two" };
}

View File

@ -0,0 +1,3 @@
<Page loaded="pageLoaded">
<HtmlView html="{{ html }}" />
</Page>

View File

@ -34,6 +34,7 @@ export class HtmlView extends common.HtmlView {
this._ios = new UILabel(); this._ios = new UILabel();
this._ios.userInteractionEnabled = true; this._ios.userInteractionEnabled = true;
this._ios.numberOfLines = 0;
} }
get ios(): UILabel { get ios(): UILabel {