Conversation
|
… of a Modal INSTUI-4459
47231e7 to
65d3089
Compare
|
TEST#1 |
|
TEST#2 |
|
TEST#3 |
| //This should prevent a Tooltip from closing when inside of a Modal | ||
| if (this._options.isTooltip) { | ||
| event.stopPropagation() | ||
| } |
There was a problem hiding this comment.
This solution is based on registering the Tooltips ESC event listener first, even before the Modal's, so when pressing ESC, the first registered event listener (the one belonging to the Tooltip) is executed first as well. Then the event propagation is stoped from reaching the Modal.
| on={on} | ||
| shouldRenderOffscreen | ||
| shouldReturnFocus={true} | ||
| shouldReturnFocus={false} |
There was a problem hiding this comment.
this line which caused the whole issue is reverted to false
matyasf
left a comment
There was a problem hiding this comment.
very nice work! Lets merge this because its urgent, but we should write some unit tests for this in the future
balzss
left a comment
There was a problem hiding this comment.
left one comment, otherwise it look good, great work!
| /** | ||
| * Whether or not the element is a Tooltip | ||
| */ | ||
| isTooltip: PropTypes.bool |
There was a problem hiding this comment.
is this needed for something?
There was a problem hiding this comment.
it is needed because of the FocusRegionOptions is joined with the Dialog's props
INSTUI-4459
TEST PLAN:
test the examples in Tooltip:
test the Tooltip when inside of a modal:
test the Tooltip with Tray:
after closing the tray you couldn't tab anywhere)
test the Tooltip with Buttons opening modals:
test the Tooltip with a complex Dialog example: