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

Clicking on a link in Tooltip that is part of a Modal doesn't work #5349

Closed
walkerp opened this issue Feb 13, 2020 · 8 comments
Closed

Clicking on a link in Tooltip that is part of a Modal doesn't work #5349

walkerp opened this issue Feb 13, 2020 · 8 comments

Comments

@walkerp
Copy link

walkerp commented Feb 13, 2020

from IBM's @console/pal package.json using:
"carbon-components": "~10.9.0",
"carbon-components-react": "~7.9.0",

I have a Modal dialog with focusTrap set to true.
I have a Tooltip with a Link. When I click on the link, it doesn't go to that url.

Here's the Tooltip code:

<Tooltip
    triggerText={null}
    tabIndex={0}
    direction='bottom'
>
    <div style={{ fontSize: '.875rem' }}>
        <span>{t('resource-group-info')}</span>
        <br></br><br></br>
        <Link href='https://cloud.ibm.com/docs/resources?topic=resources-rgs' target='_blank' onClick={() => { }}>
            {t('resource-group-doc-link')}
        </Link>
    </div>
</Tooltip>

If I set focusTrap={false} on the Modal it works fine. But then I can't use the focusTrap on the Modal... which is needed.

@emyarod
Copy link
Member

emyarod commented Feb 13, 2020

can you create a reduced test case in Code Sandbox for easier testing and debugging?

@walkerp
Copy link
Author

walkerp commented Feb 13, 2020

@emyarod I recreated the problem in a simple Modal in a Code sandbox --> https://codesandbox.io/s/tooltip-bug-issue-5349-vi32l

@asudoh
Copy link
Contributor

asudoh commented Feb 14, 2020

If this happens only happens with focusTrap={false}, I think it's a side effect of third-party focus-trap-react library and #5260 addressed this issue given #5260 eliminates the need for such third-party library. Please stay tuned for the next release. Thanks!

@walkerp
Copy link
Author

walkerp commented Feb 14, 2020

@asudoh Thanks for the quick response. Do you know when the next release will be available? What release number will it be that has the fix?

@asudoh
Copy link
Contributor

asudoh commented Feb 15, 2020

@walkerp I don't have a good idea, but I imagine it's within the next couple of weeks. And I expect a newer release than the current one (which you can see at https://www.npmjs.com/package/carbon-components-react) will have this fix.

@tw15egan
Copy link
Member

10.10.0-rc should go out this week, and pending no problems, officially released EOW / start of next week

@briangleeson
Copy link
Contributor

Just to say I also ran into this issue, but with an OverFlowMenu in the modal. The click events on the OverFlowMenuItem components werent working. Tried out focusTrap=false and it works fine. Good to see there's a fix almost out for this.

@abbeyhrt
Copy link
Contributor

Closing this issue since it's been fixed in #5260 and is now released in v10.10!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants