Skip to content

Commit 6dd61cd

Browse files
committed
style: format code
1 parent c638f2a commit 6dd61cd

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

components/_util/env.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export const UA = inBrowser && window.navigator.userAgent.toLowerCase();
66
export const isIE = UA && /msie|trident/.test(UA);
77
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0;
88
export const isEdge = UA && UA.indexOf('edge/') > 0;
9-
export const isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
10-
export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
9+
export const isAndroid = (UA && UA.indexOf('android') > 0) || weexPlatform === 'android';
10+
export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || weexPlatform === 'ios';
1111
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
1212
export const isPhantomJS = UA && /phantomjs/.test(UA);
1313
export const isFF = UA && UA.match(/firefox\/(\d+)/);

components/vc-select/Select.jsx

+11-6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
} from './util';
5252
import { SelectPropTypes } from './PropTypes';
5353
import contains from '../_util/Dom/contains';
54+
import { isIE, isEdge } from '../_util/env';
5455

5556
Vue.use(ref, { name: 'ant-ref' });
5657
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';
@@ -623,13 +624,17 @@ const Select = {
623624
},
624625
inputBlur(e) {
625626
const target = e.relatedTarget || document.activeElement;
627+
628+
// https://github.com/vueComponent/ant-design-vue/issues/999
629+
// https://github.com/vueComponent/ant-design-vue/issues/1223
626630
if (
627-
e.relatedTarget === this.$refs.arrow ||
628-
(target &&
629-
this.selectTriggerRef &&
630-
this.selectTriggerRef.getInnerMenu() &&
631-
this.selectTriggerRef.getInnerMenu().$el === target) ||
632-
contains(e.target, target)
631+
(isIE || isEdge) &&
632+
(e.relatedTarget === this.$refs.arrow ||
633+
(target &&
634+
this.selectTriggerRef &&
635+
this.selectTriggerRef.getInnerMenu() &&
636+
this.selectTriggerRef.getInnerMenu().$el === target) ||
637+
contains(e.target, target))
633638
) {
634639
e.target.focus();
635640
e.preventDefault();

0 commit comments

Comments
 (0)