Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Stylesheet for GDPR Cookie Notice inexplicably disabled in Chrome inside Customizer preview #3

Open
westonruter opened this issue Jul 5, 2018 · 0 comments

Comments

@westonruter
Copy link

As raised by @felixarntz to me, there is a strange issue whereby the GDPR cookie notice initially appears in the Customizer preview:

image

But then after ~5 seconds of loading the styles for the notice are just disabled. It's as if the stylesheet is removed from the DOM. Nevertheless, the style#wp-gdpr-cookie-notice-stylesheet element remains intact in the DOM. The unstyled notice looks like this (with position:fixed removed it then appears in the footer):

image

I added a DOM breakpoint to break on subtree modifications to the document and it breaks here immediately before the stylesheet gets disabled:

image

The link element being removed at this point (as reported by DevTools) is:

<link rel="preconnect" href="https://src.wordpress-develop.test" referrerpolicy="origin">

If I open dev tools and merely touch the contents of the style element (just click to edit but then click out without making any changes):

image

Then the stylesheet is somehow re-enabled and the notice gets re-styled.

I reproduced this issue in Chrome 67 and Chrome 69 (Canary). I could not reproduce the issue in Safari or Firefox.

(Note that the Customizer preview serves dirty AMP (that is, a non-valid AMP document) because the interface requires custom scripts and styles to live preview changes. This use of AMP is not officially supported.)

To reproduce the issue:

  1. Install the latest develop build of the AMP plugin.
  2. Activate the wp-gdpr-cookie-notice plugin
  3. Activate one of the core themes, like Twenty Sixteen.
  4. Go to the WP Admin > AMP and enable Native mode.
  5. Access the Customizer in Chrome via /wp-admin/customize.php.
  6. Wait 5 seconds after the edit shortcuts appear, and blink the notice disappears.

I suspect it could be a Blink bug.

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

1 participant