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

[navbar] fix click events on sidebar toggle when using a custom svg-icon in IE11 #528

Merged

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jul 19, 2017

See related issue #526 .

Setting pointer-events: none allows the click event to propagate to its wrapper and toggle the sidebar.

…rigger, allows click event to propate to its wrapper element
@@ -137,3 +137,7 @@
.ampstart-sidebar .ampstart-navbar-trigger {
line-height: inherit;
}

.ampstart-headerbar .ampstart-navbar-trigger svg {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just .ampstart-navbar-trigger svg should be fine. is this because the svg does not bubble up click events?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the svg elements swallows the click events, which never bubble up

Copy link
Collaborator

@camelburrito camelburrito left a comment

Choose a reason for hiding this comment

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

Address the comments

@camelburrito camelburrito merged commit d745ebc into ampproject:master Jul 20, 2017
gifteconomist pushed a commit to metalabdesign/ampstart that referenced this pull request Oct 19, 2017
…con in IE11 (ampproject#528)

* fix(navbar): setting pointer-events to none when using a custom svg-trigger, allows click event to propate to its wrapper element

* refactor(styles): updated selector to prevent pointer events on svg icons inside the navbar trigger
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.

2 participants