style: format code
parent
c638f2adbd
commit
6dd61cdb76
|
@ -6,8 +6,8 @@ export const UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
||||||
export const isIE = UA && /msie|trident/.test(UA);
|
export const isIE = UA && /msie|trident/.test(UA);
|
||||||
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
||||||
export const isEdge = UA && UA.indexOf('edge/') > 0;
|
export const isEdge = UA && UA.indexOf('edge/') > 0;
|
||||||
export const isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
|
export const isAndroid = (UA && UA.indexOf('android') > 0) || weexPlatform === 'android';
|
||||||
export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
|
export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || weexPlatform === 'ios';
|
||||||
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
|
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
|
||||||
export const isPhantomJS = UA && /phantomjs/.test(UA);
|
export const isPhantomJS = UA && /phantomjs/.test(UA);
|
||||||
export const isFF = UA && UA.match(/firefox\/(\d+)/);
|
export const isFF = UA && UA.match(/firefox\/(\d+)/);
|
||||||
|
|
|
@ -51,6 +51,7 @@ import {
|
||||||
} from './util';
|
} from './util';
|
||||||
import { SelectPropTypes } from './PropTypes';
|
import { SelectPropTypes } from './PropTypes';
|
||||||
import contains from '../_util/Dom/contains';
|
import contains from '../_util/Dom/contains';
|
||||||
|
import { isIE, isEdge } from '../_util/env';
|
||||||
|
|
||||||
Vue.use(ref, { name: 'ant-ref' });
|
Vue.use(ref, { name: 'ant-ref' });
|
||||||
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';
|
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';
|
||||||
|
@ -623,13 +624,17 @@ const Select = {
|
||||||
},
|
},
|
||||||
inputBlur(e) {
|
inputBlur(e) {
|
||||||
const target = e.relatedTarget || document.activeElement;
|
const target = e.relatedTarget || document.activeElement;
|
||||||
|
|
||||||
|
// https://github.com/vueComponent/ant-design-vue/issues/999
|
||||||
|
// https://github.com/vueComponent/ant-design-vue/issues/1223
|
||||||
if (
|
if (
|
||||||
e.relatedTarget === this.$refs.arrow ||
|
(isIE || isEdge) &&
|
||||||
(target &&
|
(e.relatedTarget === this.$refs.arrow ||
|
||||||
this.selectTriggerRef &&
|
(target &&
|
||||||
this.selectTriggerRef.getInnerMenu() &&
|
this.selectTriggerRef &&
|
||||||
this.selectTriggerRef.getInnerMenu().$el === target) ||
|
this.selectTriggerRef.getInnerMenu() &&
|
||||||
contains(e.target, target)
|
this.selectTriggerRef.getInnerMenu().$el === target) ||
|
||||||
|
contains(e.target, target))
|
||||||
) {
|
) {
|
||||||
e.target.focus();
|
e.target.focus();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue