Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix focus region issues #1371

Merged
merged 1 commit into from
Nov 21, 2023
Merged

fix focus region issues #1371

merged 1 commit into from
Nov 21, 2023

Conversation

balzss
Copy link
Contributor

@balzss balzss commented Nov 20, 2023

INSTUI-3938

this PR fixes several issues related to the shouldCloseOnDocumentClick option in focus region. these are:

  1. changing the content of a dialog (modal/popover/etc) dismisses it which can be observed in the Drilldown Menu pattern or in this example
  2. if a dialog has an input field and you highlight the text with mouse and you release the mouse button when the cursor is outside the dialog then the dialog closes (which was fixed previously but reoccured recently)
  3. tooltips closed on click as they were having the shouldCloseOnDocumentClick option set to true

test plan:

  • go to the Drilldown Menu example and test the following things:
    • clicking on the trigger should open the menu, clicking on the trigger again should close it
    • clicking outside the menu when it's open should close it
    • clicking on a menu item shouldn't close the popover
    • clicking on a menu item dragging the mouse outside the popover while holding don't the mouse button shouldn't close the popover

Copy link

Preview URL: https://1371--preview-instui.netlify.app

@balzss balzss force-pushed the fix/modal-misfire-ondismiss branch from 6e2f1b6 to d9ad288 Compare November 20, 2023 17:48
@balzss balzss changed the title wip: fix all dialog issues ever wip: fix focus region issues Nov 20, 2023
@balzss balzss changed the title wip: fix focus region issues fix focus region issues Nov 20, 2023
@balzss balzss marked this pull request as ready for review November 20, 2023 21:43
@balzss balzss self-assigned this Nov 20, 2023
@balzss balzss merged commit 9f59f09 into master Nov 21, 2023
4 checks passed
@balzss balzss deleted the fix/modal-misfire-ondismiss branch November 21, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants