clients icon indicating copy to clipboard operation
clients copied to clipboard

[PM-8207] Inline menu unable to inject into body element when another script is attempting to force its element as the bottom-most element

Open cagonzalezcs opened this issue 3 weeks ago â€ĸ 2 comments

🎟ī¸ Tracking

https://bitwarden.atlassian.net/browse/PM-8207

📔 Objective

The goal of these changes is to ensure that we can safely trigger an exit case when a script is attempting to override the positioning of our inline menu by forcing itself to the bottom of the <body> container of the page.

This behavior was found as a result of a separate extension that required its own DOM element to remain on top of all other elements. The implementation we're putting forth provides a check where elements that trigger a repeated mutation are potentially allowed to be structured as the bottom element of the page's <body>.

This will only be allowed if that element is not overlaying our own inline menu elements. If that ends up being the case, we simply will remove the inline menu without affecting other aspects of the page. This is done to avoid click-jacking in relation to our inline menu elements.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

đŸĻŽ Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹī¸ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠ī¸ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or â™ģī¸ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

cagonzalezcs avatar Jun 12 '24 18:06 cagonzalezcs