Skip to content

Add missing things in hide method of dropdown#33451

Merged
XhmikosR merged 3 commits intomainfrom
rohit/dropdown-hide-method
Apr 1, 2021
Merged

Add missing things in hide method of dropdown#33451
XhmikosR merged 3 commits intomainfrom
rohit/dropdown-hide-method

Conversation

@rohit2sharma95
Copy link
Copy Markdown
Contributor

@rohit2sharma95 rohit2sharma95 commented Mar 23, 2021

Purpose:

  1. When hiding dropdown programmatically using the hide method, the value of the aria-expanded attribute should be updated to false (like it is being in clearMenus for now).
  2. hide method should remove event listener on the touch-enabled device (That was added in show method)

Preview: https://deploy-preview-33451--twbs-bootstrap.netlify.app/docs/5.0/components/dropdowns/

@rohit2sharma95 rohit2sharma95 requested a review from a team as a code owner March 23, 2021 19:50
@GeoSot GeoSot self-requested a review March 24, 2021 00:20
Comment thread js/src/dropdown.js
@XhmikosR
Copy link
Copy Markdown
Member

@rohit2sharma95 can you check if this applies to v4-dev too? And also @GeoSot's last comment :)

@rohit2sharma95
Copy link
Copy Markdown
Contributor Author

Yes @XhmikosR , it will be backported to V4.

@rohit2sharma95 rohit2sharma95 force-pushed the rohit/dropdown-hide-method branch from 8d8c97e to 31f508a Compare March 24, 2021 18:57
@rohit2sharma95 rohit2sharma95 changed the title Update aria-expanded attribute in hide method of dropdown Add missing things in hide method of dropdown Mar 24, 2021
Comment thread js/src/dropdown.js
[].concat(...document.body.children)
.forEach(elem => EventHandler.off(elem, 'mouseover', null, noop()))
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think, till next pr this is not valid. you call it in the hide function, it is not triggered by any event ;)

@XhmikosR XhmikosR merged commit 20cfbdf into main Apr 1, 2021
@XhmikosR XhmikosR deleted the rohit/dropdown-hide-method branch April 1, 2021 18:51
@XhmikosR
Copy link
Copy Markdown
Member

@rohit2sharma95 can you please backport this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants