You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Development mode throws the following error amp-bind: Default value for [height] does not match first expression result (550). This can result in unexpected behavior after the next state change. even though the default value is in fact the same as the first expression result
How do we reproduce the issue?
Set an amp-carousel to have a dynamic height via [height]
Define the height to the appropriate default value
Load the page in development mode and observe the console
My specific example:
<amp-carousel
[height]="visible ? 720 : 550"
height="550"
width="400"
layout="responsive"
type="slides">
<div class="carousel__slide">
<p>Text content here</p>
<button [text]="visible ? 'See Less' : 'See More'"
on="tap:AMP.setState({visible: !visible})">See More</button>
<ul [class]="visible ? 'show' : 'hide'" class="hide">
<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</li>
<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</li>
<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</li>
</ul>
</div>
</amp-carousel>
What browsers are affected?
Seemingly all browsers
Which AMP version is affected?
Version 1509747505247
The text was updated successfully, but these errors were encountered:
/to @choumx Issues seems to be with verifyBinding_ which other than text and class seems to assume everything else is a boolean attribute. The bug does not impact actual behaviour, just wrong logging in development mode.
Thanks for filing this issue. This message is actually just a warning, though it has been confusing for many others too. We'll fix this and clarify the messaging.
dreamofabear
changed the title
Issue with height validation in development mode
amp-bind: Spurious verify warnings for [height]
Nov 15, 2017
What's the issue?
Development mode throws the following error
amp-bind: Default value for [height] does not match first expression result (550). This can result in unexpected behavior after the next state change.
even though the default value is in fact the same as the first expression resultHow do we reproduce the issue?
[height]
My specific example:
What browsers are affected?
Seemingly all browsers
Which AMP version is affected?
Version 1509747505247
The text was updated successfully, but these errors were encountered: