Amphtml: amp-bind and amp-fit-text don't work together

Created on 6 Sep 2018  路  2Comments  路  Source: ampproject/amphtml

What's the issue?

When amp-fit-text is used with a [text]='...' attribute it loses all styling

How do we reproduce the issue?

You can see this issue in action here: http://output.jsbin.com/qeferovaje/

  1. Add an amp-fit-text element that is effected by state:
    <amp-fit-text ... [text]='someState'>Default Text</amp-fit-text>
  2. Set that state after the amp-fit-text has rendered. In the example above we just use AMP.setState(...) on button tap
  3. Observe the amp-fit-text no longer behaving

If you were to try this same test but using [text] on a subelement, the amp-fit-text retains its styling, but doesn't trigger any resize.

What browsers are affected?

Seems to be all browsers

Which AMP version is affected?

1535566825959

amp-fit-text Developer Soon Bug DevX components

All 2 comments

/cc @choumx fix would be on amp-fit-text side I assume. We just need to rerun the logic when content changes.

This issue hasn't been updated in awhile. @aghassemi Do you have any updates?

Was this page helpful?
0 / 5 - 0 ratings