CITguy / toggle-grayscale

Chrome extension to toggle between full color and grayscale
https://chrome.google.com/webstore/detail/toggle-grayscale/feefpfioflmdeinmmllkeemhmpagonlo
0 stars 0 forks source link

[bug] extension affects CSS layout #4

Closed CITguy closed 3 years ago

CITguy commented 3 years ago

Issue

Extension is affecting CSS layout, when enabled.

Expected Result

Extension should not interfere with CSS layout.

Steps to reproduce

  1. Install extension from Chrome Web Store (link on GH repo home screen)
  2. Navigate to https://rackerlabs.github.io/encore-ui/5.x/#/elements/Forms
  3. Scroll down a bit
  4. "Submit Feedback" should be on bottom left of viewport
  5. toggle extension ON (make page grayscale)
  6. "Submit Feedback" does not stick to bottom left of viewport

Screenshots

  1. "Submit Feedback" positioning is broken when extension is ON
  2. "Submit Feedback" positioning is correct when extension is OFF

CleanShot 2021-03-16 at 10 18 44@2x CleanShot 2021-03-16 at 10 19 40@2x

CITguy commented 3 years ago

This is due to filter modifying the stacking context required by the page content.

Instead, what if we inject a <div> that fills the viewport with a fixed position and ignores pointer events...

See https://codepen.io/CITguy/pen/3bbd84a460b3152eb308e3a5cf673d77 for prototype