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

Bind event handlers on the details summary only #912

Merged
merged 2 commits into from
Jul 17, 2018

Conversation

36degrees
Copy link
Contributor

@36degrees 36degrees commented Jul 17, 2018

This fixes an issue where clicking the revealed content in browsers that do not support the native details element causes the details element to collapse. (Fixes #911)

It also fixes an issue in all browsers where clicking the revealed content ‘flips’ the aria-expanded attribute on the summary element and the aria-hidden attribute on the content element, causing them to get out of sync with the visible state of the component.

As this mostly affects browsers that do not support the details element natively, I've focused testing on that – this has been tested in IE8-11, Edge 17, Chrome 67, Firefox 61, Firefox 46, Safari 5.1, Safari on iOS 5.1 and IE11 mobile.

https://trello.com/c/teyeHFNS/1214-details-component-collapses-when-content-is-clicked-in-edge-ie11

This fixes an issue where clicking the revealed content in browsers that do not support the native `details` element causes the details element to collapse. (Fixes #911)

It also fixes an issue in all browsers where clicking the revealed content ‘flips’ the aria-expanded attribute on the summary element and the aria-hidden attribute on the content element, causing them to get out of sync with the visible state of the component.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-912 July 17, 2018 08:41 Inactive
@36degrees 36degrees requested a review from NickColley July 17, 2018 08:52
Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

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

Good test and fix, needs a changelog entry please.

@36degrees 36degrees merged commit 04ef2bc into master Jul 17, 2018
@36degrees 36degrees deleted the fix-details-component-events branch July 17, 2018 10:42
@36degrees 36degrees added this to the [NEXT] milestone Jul 17, 2018
@NickColley NickColley mentioned this pull request Jul 17, 2018
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.

Details component collapses when content is clicked in Edge, IE11
3 participants