menu icon indicating copy to clipboard operation
menu copied to clipboard

Prevent the duplicated aria-hidden element being attached to DOM

Open patrickomeara opened this issue 3 years ago • 3 comments

Thanks for your work on #385 @zombieJ.

Is there a way to prevent the aria-hidden element being added to the DOM?

The upgrade to antd 4.16 has caused many issues in our app. Our component and browsers tests now fail due to duplicate elements and nested Modals that use portals within the Menu.Items now display twice.

Preventing the hidden component being attached to the DOM would prevent both of these issues.

Originally posted by @patrickomeara in https://github.com/react-component/menu/issues/385#issuecomment-887179618

patrickomeara avatar Jul 28 '21 23:07 patrickomeara

Same problem here. This completely breaks our browser tests as there are now duplicate id:s in the menu. Please fix ASAP.

JNokikana avatar Feb 25 '22 09:02 JNokikana

+1, I have the same issue, it does not work well for automation testing because it selects two elements instead of one

michael-vasyliv avatar Aug 16 '22 15:08 michael-vasyliv

is it possible to add a flag to avoid this line? https://github.com/react-component/menu/blob/8ab1b6629574f390dc344b4d0533f0be9877dba7/src/Menu.tsx#L620

michael-vasyliv avatar Aug 16 '22 15:08 michael-vasyliv