fix(Popover): close-on-click-outside not work (#8352)

This commit is contained in:
neverland
2021-03-15 20:05:45 +08:00
committed by GitHub
parent d9c51b9070
commit 40a1b27c5d
3 changed files with 24 additions and 3 deletions
+12
View File
@@ -175,3 +175,15 @@ test('should not close Popover when overlay is clicked and close-on-click-overla
trigger(overlay, 'touchstart');
expect(wrapper.emitted('update:show')).toBeFalsy();
});
test('should not close Popover when outside is clicked and close-on-click-outside is false', () => {
const wrapper = mount(Popover, {
props: {
show: true,
closeOnClickOutside: false,
},
});
trigger(document.body, 'touchstart');
expect(wrapper.emitted('update:show')).toBeFalsy();
});