question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ComposedModal does not remove preventCloseOnClickOutside property from div

See original GitHub issue

[Title]: The recently added preventCloseOnClickOutside property is not properly handled in ComposedModal. Compare with Modal for proper handling. This results in a browser warning about the property not being recognized for a div.

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Simple use case. Using the ComposedModal component with the preventCloseOnClickOutside property results in a warning in the browser console. Note that there appears to be no behavioral defect; the property does function correctly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
renageriecommented, Oct 21, 2020

Indeed. In fact, I was looking to remove our existing onRequestClose wrapper since it would no longer be needed thanks to this property. However, that results in console errors for ComposedModal, so I will hold off on that change awaiting a fix for this issue.

0reactions
renageriecommented, Oct 21, 2020

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Carbon component ComposedModal fails a11y testing #3103
Accessibility tests for carbon component ComposedModal fails. Since the aria-label for the div bx--modal-container is not set.
Read more >
ComposedModal - Carbon Components React
Setting data-modal-primary-focus attribute to the target element; Specifying a query ... Called for all onKeyDown events that do not close the modal.
Read more >
Modal - Carbon Components Svelte - Render
preventCloseOnClickOutside prevents the modal from being closed when clicking outside of an open modal. This prop is intended to be used for transactional ......
Read more >
How to stop default behaviour of modal element in carbon ...
Stack Overflow is not a free script writing service. Your own research and code attempts are expected. Edit the question to include your...
Read more >
@carbon/layout: Versions | Openbase
Filterable): onMenuChange was not being called (#8752) ( c99e1354d ) ... fix(DatePicker): avoid unknown attribute on div tag (#8747) ( 0d2f0a3ab ) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found