trigger icon indicating copy to clipboard operation
trigger copied to clipboard

Popup container gets in the way

Open ukupat opened this issue 8 years ago • 9 comments

We upgraded from version 1.8.2 to 1.8.3 and found out that it isn't possible to interact with elements that are close to rc-trigger component anymore. I hope this screenshot explains more:

screen shot 2017-04-04 at 14 06 46

It seems that https://github.com/react-component/trigger/commit/2e4adf7db83a9e4fe30b14d57715881f77ef226e has caused this problem.

ukupat avatar Apr 04 '17 11:04 ukupat

This also effects clicking outside to close the popover, the popover container remains in the way and stops other input from reaching the rest of the web app. Confirmed that reverting the above commit fixes the issue.

njpatel avatar Apr 08 '17 16:04 njpatel

An online demo will be better, thanks.

benjycui avatar Apr 20 '17 03:04 benjycui

Hello, I have created a test repository that shows this issue. See the screenshot below.

Test-app is made with create-react-app. Just run yarn start and it will run itself. As you can see, clicking on any of the buttons is not possible because of a hidden overlay created by rc-trigger.

If you remove the popup (by setting the initial visible state to false then the buttons interaction works, until the actual popup becomes visible).

Repo: https://github.com/jseminck/rc-trigger-issue

In this case, reverting the changes that were pointed out in the original comment also work. But I do not yet understand what implications that revert has for any of the other cases.

If you need any more information from me, please let me know.

screen shot 2017-06-02 at 08 14 51

jseminck avatar Jun 02 '17 05:06 jseminck

Just import rc-trigger's style in your code:

import 'rc-trigger/assets/index.css';

benjycui avatar Jun 02 '17 09:06 benjycui

While that may work, it doesn't seem like an elegant solution. If you would change the internal folder structure then it would break.

I do see now that you advise to include the default styling:

Include the default styling and then...

Are you sure the change in https://github.com/react-component/trigger/commit/2e4adf7db83a9e4fe30b14d57715881f77ef226e#diff-afbf9d41312aa7a036d65ed5e35fc955R69 is really needed?

jseminck avatar Jun 02 '17 10:06 jseminck

Actually, the problem is: if we don't set position: absolute, dom-align will set it to position: relative automatically.

So we need to import the default style.

Or can we just set popup element to position: absolute in JS. @yiminghe @afc163

benjycui avatar Jun 05 '17 01:06 benjycui

ping @afc163 @yiminghe

benjycui avatar Nov 03 '17 05:11 benjycui

👌

afc163 avatar Nov 03 '17 06:11 afc163

@MrPeak 试下?

benjycui avatar Nov 03 '17 06:11 benjycui