Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for page alert pointer-events issue #2217

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Conversation

tylersticka
Copy link
Member

@tylersticka tylersticka commented Dec 12, 2023

Overview

When our Page layout object has an alert, its container blocks clicks, text selections, etc. below.

This is an issue when an alert within is hidden but the element itself is not.

We could refactor our alert JavaScript to target a parent element or to extend page directly, but in doing so I found a few unexpected gotchas and complicated layout considerations.

So instead, I've modified the pattern to set pointer-events on the alert's container to none, then resetting that value for child elements.

Screenshots

With this change, it's now possible to select/click/etc. elements beneath the alert row:

Screenshot 2023-12-12 at 3 04 55 PM

While still being able to interact with content therein:

Screenshot 2023-12-12 at 3 05 03 PM

Testing

On the deploy preview, navigate to the Page Example with Alert story and confirm that you can interact with content within and beneath the o-page__alert element in the following browsers:

  • Chrome
  • Edge
  • Firefox
  • Safari

Copy link

changeset-bot bot commented Dec 12, 2023

🦋 Changeset detected

Latest commit: 1089138

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudfour/patterns Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Dec 12, 2023

Deploy Preview for cloudfour-patterns ready!

Name Link
🔨 Latest commit 1089138
🔍 Latest deploy log https://app.netlify.com/sites/cloudfour-patterns/deploys/6578e7f8517ca000083ac4e0
😎 Deploy Preview https://deploy-preview-2217--cloudfour-patterns.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tylersticka tylersticka marked this pull request as ready for review December 12, 2023 23:14
@tylersticka tylersticka requested a review from a team December 12, 2023 23:14
@tylersticka tylersticka merged commit 0852135 into main Dec 13, 2023
10 checks passed
@tylersticka tylersticka deleted the fix/blocking-page-alert branch December 13, 2023 17:59
@github-actions github-actions bot mentioned this pull request Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants