Title: HtmlView on iOS resets font on binding change · Issue #1268 · NativeScript/NativeScript · GitHub
Open Graph Title: HtmlView on iOS resets font on binding change · Issue #1268 · NativeScript/NativeScript
X Title: HtmlView on iOS resets font on binding change · Issue #1268 · NativeScript/NativeScript
Description: Okay so use this example: https://gist.github.com/N3ll/f6c939539b6c0e0ae0e5 So basically any time you change the content bound to the html property, the font assigned gets reset...so need to keep re-calling this. I mean the UIFont is sti...
Open Graph Description: Okay so use this example: https://gist.github.com/N3ll/f6c939539b6c0e0ae0e5 So basically any time you change the content bound to the html property, the font assigned gets reset...so need to keep r...
X Description: Okay so use this example: https://gist.github.com/N3ll/f6c939539b6c0e0ae0e5 So basically any time you change the content bound to the html property, the font assigned gets reset...so need to keep r...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/1268
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HtmlView on iOS resets font on binding change","articleBody":"Okay so use this example:\nhttps://gist.github.com/N3ll/f6c939539b6c0e0ae0e5\n\nSo basically any time you change the content bound to the html property, the font assigned gets reset...so need to keep re-calling this. I mean the UIFont is still there but what's in the view is reset to Times, and you need to re-call the .ios.font on it.\n\n```\n var contentHtmlView = page.getViewById(\"contentHtmlView\");\n contentHtmlView.ios.font = UIFont.fontWithNameSize(fontName,fontSize);\n```\n\nWhen I change the property bound to viewModel\n\n```\n\u003cHtmlView id=\"contentHtmlView\" html=\"{{ Content }}\" /\u003e\n```\n\nVideo: http://www.screencast.com/t/0muA1wA5\n\nCode in the click of the video is just this\n\n```\nexports.onChangeContent = function(args){\n var contentHtmlView = page.getViewById(\"contentHtmlView\");\n\n viewModel.Content = \"Changed: ios.font is \" + contentHtmlView.ios.font;\n}\n```\n\nby default on page load contentHtmlView.ios.font is null\n\r\n\r\n\u003cbountysource-plugin\u003e\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29188056-htmlview-on-ios-resets-font-on-binding-change?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github).\r\n\u003c/bountysource-plugin\u003e","author":{"url":"https://github.com/sitefinitysteve","@type":"Person","name":"sitefinitysteve"},"datePublished":"2015-12-16T20:57:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/1268/NativeScript/issues/1268"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8d9e26d7-202d-b268-3dfc-504f9b5b09ad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D092:A5031:3279EAA:4110E07:6974E75C |
| html-safe-nonce | f0ccdc8bbe7b169e0d6f1ad96ed8b216ea469ccf7af4d2a56abf8a2e0f3dd4fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDkyOkE1MDMxOjMyNzlFQUE6NDExMEUwNzo2OTc0RTc1QyIsInZpc2l0b3JfaWQiOiI0MjA5NDY1MjI3NzM0MjE0NDkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b938508f573b172c3db6d9645a236e50bb8399806572fc4f08b001e147b74d2c |
| hovercard-subject-tag | issue:122599650 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/1268/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9e0582ecc571ce6ac5ff750b43b21a6edcbfdbf85ec6315904356a5277be2655/NativeScript/NativeScript/issues/1268 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9e0582ecc571ce6ac5ff750b43b21a6edcbfdbf85ec6315904356a5277be2655/NativeScript/NativeScript/issues/1268 |
| og:image:alt | Okay so use this example: https://gist.github.com/N3ll/f6c939539b6c0e0ae0e5 So basically any time you change the content bound to the html property, the font assigned gets reset...so need to keep r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sitefinitysteve |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width