[Bug Report]iview select selector needs double click to select ie10.

kx5bkwkv  于 22天前  发布在  其他
关注(0)|答案(5)|浏览(14)

Environment

ie10浏览器

https://www.iviewui.com/components/select

Steps to reproduce

在ie10打开 https://www.iviewui.com/components/select,选择内容

What is expected?

单击即可选中

What is actually happening?

双击才能选中

fsi0uk1n

fsi0uk1n1#

Translation of this issue:
Environment
Ie10 browser
Reproduction link
https://www.iviewui.com/components/select
Steps to reproduce
Open https://www.iviewui.com/components/select in ie10 and select content.
What is expected?
Click to select
What is actually happening?
Double click to select

z9smfwbn

z9smfwbn2#

Me too. Hope this issue can be resolved as soon as possible.

fnx2tebb

fnx2tebb4#

YES,I have the same problem on IE10

j8yoct9x

j8yoct9x5#

在main.js里加

var isIE = function() {
return(window.navigator.userAgent.indexOf("MSIE") >= 1);
}

// 修复iview 在IE10及以下版本不支持dataset属性的问题,兼容transfer-dom.js中使用了dataset的问题
if(isIE() && window.HTMLElement) {
if(Object.getOwnPropertyNames(HTMLElement.prototype).indexOf('dataset') === -1) {
Object.defineProperty(HTMLElement.prototype, 'dataset', {
get: function() {
var attributes = this.attributes;
var name = [],
value = [];
var obj = {};
for(var i = 0; i < attributes.length; i++) {
if(attributes[i].nodeName.slice(0, 5) == 'data-') {
name.push(attributes[i].nodeName.slice(5));
value.push(attributes[i].nodeValue);
}
}
for(var j = 0; j < name.length; j++) {
obj[name[j]] = value[j];
}
return obj;
}
});
}
}

相关问题