Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

BUG: Amp-Sidebar "inline styles" error #1341

Closed
orlov0562 opened this issue Jul 9, 2018 · 5 comments
Closed

BUG: Amp-Sidebar "inline styles" error #1341

orlov0562 opened this issue Jul 9, 2018 · 5 comments

Comments

@orlov0562
Copy link

Hi there,

When I try to run amp-sidebar example, from here or here in Chrome it produce next error in Developers Tools Console:

Inline styles with top, bottom and other CSS rules are not supported yet for fixed or sticky elements (#14186). Unexpected behavior may occur.

Looks like the example doesn't match Chrome AMP requirements (LOL)

Steps to reproduce

  • Open example from here or here in Chrome
  • Open Developers Tools, switch to Console tab
  • Press three times on "Toogle sidebar"

Current behavior

Error: Inline styles with `top`, `bottom` and other CSS rules are not supported yet for fixed or sticky elements (#14186). Unexpected behavior may occur.

image

Expected behavior
No errors

@fstanis
Copy link
Collaborator

fstanis commented Jul 9, 2018

This warning actually comes from the AMP runtime (specifically here) and it's safe to ignore.

Specifically, it's part of an experiment (#11881) to enable partial support for style attributes. Because <amp-sidebar> gets a style attribute when toggled, this triggers the (false positive) warning.

@fstanis fstanis closed this as completed Jul 9, 2018
@madestroIT
Copy link

This is happening to me as well and it's not just logging errors. It disables the bar after it is hidden. JS errors occur and the sidebar can no longer be shown.

It can be seen here.

@karsten-eger
Copy link

It seems this problem is back again. We noticed it today in our navigation menu (in production no less!). The example madestrolT mentions does have the issue as well.

@fstanis
Copy link
Collaborator

fstanis commented May 29, 2019

Hi, this repo is no longer active since ampbyexample.com has been replaced by amp.dev.

If it's a sample issue, please report to https://github.com/ampproject/docs
If it's a component issue, please report to https://github.com/ampproject/amphtml

I'm unable to reproduce the issue that madestroIT explained in the sample at least, so we may need more information.

@karsten-eger
Copy link

Done so - thanks!

ampproject/amphtml#22553

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants