flutter_inappwebview
flutter_inappwebview copied to clipboard
CSS injection issue
- [x] I have read the Getting Started section
- [x] I have already searched for the same problem
Similar issues: https://github.com/pichillilorenzo/flutter_inappwebview/issues/821, https://github.com/pichillilorenzo/flutter_inappwebview/issues/1388
Environment
Technology | Version |
---|---|
Flutter version | 3.19.5 |
Plugin version | 6.0.0 |
Android version | 13 |
iOS version | |
macOS version | |
Xcode version | |
Google Chrome version |
Device information: Pixel 5 emulator
Description
Expected behavior: Should correctly inject css that is using pseudo-class :has (but that may not matter) and apply style even though there are modifications from web as well, related to hiding some elements.
Current behavior: Elements referenced in such way are not affected.
Moreover I'm kind of confused but I believe some parts of CSS were cached and in a way I cannot remove them. Used CookieManager/WebStorageManager, IDE invalidation, wiping emulator data.
Steps to reproduce
- On website use the script, like: .some-parent:has(.someclassname) { display: none }
- In injectCSSCode on app side use reversed one (with !important): .some-parent:has(.someclassname) { display: block !important }
- Load page to see effects.