zakodium-oss / react-science

React components and tools to build scientific applications.
https://react-science.pages.dev
MIT License
2 stars 6 forks source link

Clicking outside to close the Color Picker is closing the modal #638

Closed hamed-musallam closed 7 months ago

hamed-musallam commented 7 months ago

https://react-science.pages.dev/stories/?path=/story/components-color-pickers--color-picker-dropdown-story

https://github.com/zakodium-oss/react-science/assets/35760236/444a83c8-5491-4e92-8920-0c56896ffebf

hamed-musallam commented 7 months ago

After migrating to react-science version 0.33 and replacing the old Modal component with the Dialog component from Blueprint.js, the color picker is now appearing behind the Dialog

https://github.com/cheminfo/nmrium/pull/2865

image

wadjih-bencheikh18 commented 7 months ago

@hamed-musallam @stropitek This happens because of react-science Portal blueprint js portal are diffrent

So we need to refactor any react-science component that uses it.

hamed-musallam commented 7 months ago

I believe the color picker should use the Portal from Blueprintjs. As I can see, we have fully replaced the Modal with Dialog.

wadjih-bencheikh18 commented 7 months ago

Yes I changed the ColorPicker here https://github.com/zakodium-oss/react-science/pull/641