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(cdk/overlay): overriding pointer-events style #21666

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

crisbeto
Copy link
Member

We set pointer-events: auto on the overlay when it is attached and then none while it's detaching which ends up overriding any other styles the user might have. These changes reset to '' instead.

Fixes #21656.

We set `pointer-events: auto` on the overlay when it is attached and then `none` while it's
detaching which ends up overriding any other styles the user might have. These changes
reset to `''` instead.

Fixes angular#21656.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jan 21, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 21, 2021
@@ -368,7 +368,7 @@ export class OverlayRef implements PortalOutlet, OverlayReference {

/** Toggles the pointer events for the overlay pane element. */
private _togglePointerEvents(enablePointer: boolean) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was debating renaming this at the same time to _disablePointerEvents since it never really does enable them anymore, it just disables or defaults...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO "toggle" still makes sense since the default is for them to be enabled.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is in a css class though, this code really doesn't know and shouldn't care what that default is. Just my opinion though 🤷

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Jan 22, 2021
@andrewseguin andrewseguin merged commit 9e87050 into angular:master Jan 25, 2021
andrewseguin pushed a commit that referenced this pull request Jan 25, 2021
We set `pointer-events: auto` on the overlay when it is attached and then `none` while it's
detaching which ends up overriding any other styles the user might have. These changes
reset to `''` instead.

Fixes #21656.

(cherry picked from commit 9e87050)
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Jan 26, 2021
We set `pointer-events: auto` on the overlay when it is attached and then `none` while it's
detaching which ends up overriding any other styles the user might have. These changes
reset to `''` instead.

Fixes angular#21656.
mmalerba pushed a commit to mmalerba/components that referenced this pull request Jan 29, 2021
We set `pointer-events: auto` on the overlay when it is attached and then `none` while it's
detaching which ends up overriding any other styles the user might have. These changes
reset to `''` instead.

Fixes angular#21656.
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Feb 8, 2021
We set `pointer-events: auto` on the overlay when it is attached and then `none` while it's
detaching which ends up overriding any other styles the user might have. These changes
reset to `''` instead.

Fixes angular#21656.
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Feb 8, 2021
We set `pointer-events: auto` on the overlay when it is attached and then `none` while it's
detaching which ends up overriding any other styles the user might have. These changes
reset to `''` instead.

Fixes angular#21656.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(cdk/overlay): panel 'pointer-events' can not be overridden by panelClass
4 participants