Skip to content

Commit 7d33863

Browse files
committed
fix: popupStyle missing pointerEvents
1 parent 9ada68d commit 7d33863

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Popup/PopupInner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ const PopupInner = React.forwardRef<PopupInnerRef, PopupInnerProps>(
169169
const mergedStyle: React.CSSProperties = {
170170
...stretchStyle,
171171
zIndex,
172-
...style,
173172
opacity:
174173
status === 'motion' || status === 'stable' || !visible ? undefined : 0,
175174
pointerEvents: status === 'stable' ? undefined : 'none',
175+
...style,
176176
};
177177

178178
// Align status

tests/basic.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ describe('Trigger.Basic', () => {
615615

616616
// https://github.com/ant-design/ant-design/issues/21770
617617
it('support popupStyle, such as zIndex', () => {
618-
const style = { color: 'red', zIndex: 9999, top: 100 };
618+
const style = { color: 'red', zIndex: 9999, top: 100, opacity: 0.93 };
619619
const wrapper = mount(
620620
<Trigger
621621
popupVisible
@@ -630,6 +630,7 @@ describe('Trigger.Basic', () => {
630630
expect(popupDomNode.style.zIndex).toBe(style.zIndex.toString());
631631
expect(popupDomNode.style.color).toBe(style.color);
632632
expect(popupDomNode.style.top).toBe(`${style.top}px`);
633+
expect(popupDomNode.style.opacity).toBe(style.opacity.toString());
633634
});
634635

635636
describe('getContainer', () => {

0 commit comments

Comments
 (0)