[英]Edge browser : mouseleave event triggered when changing select value
Example: http://jsfiddle.net/FGuVM/76/ 示例: http : //jsfiddle.net/FGuVM/76/
<div>
<form>
<select class='yearDropdown'>
<c:forEach var="years" items="${parkYears}">
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
</c:forEach>
</select>
</form>
On Chrome, Firefox and IE 11 mouseleave is not triggered when selecting a value from a select. 在Chrome上,从选择中选择值时不会触发Firefox和IE 11的鼠标离开。
On microsoft Edge mouseleave trigger before the change event. 在Microsoft Edge mouseleave触发器上,更改事件之前。
The select doesnt work when because I change the select size before the value changes. 由于我在值更改之前更改选择大小,因此选择不起作用。
How can i make the select work as with other browser? 如何使选择与其他浏览器一样工作?
I can confirm the discrepancy between browsers. 我可以确认浏览器之间的差异。 Further, it appears as though this may be a regression in the EdgeHTML engine, as Internet Explorer 11 on Windows 10 functions similar to Google Chrome and Mozilla Firefox in my testing :
此外,似乎这可能是EdgeHTML引擎中的回归,因为在我的测试中 Windows 10上的Internet Explorer 11的功能类似于Google Chrome和Mozilla Firefox:
<select size="3">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
with ( document.querySelector( "select" ) ) {
addEventListener( "change", log.bind( this, "change" ) );
addEventListener( "mouseenter", log.bind( this, "mouseenter" ) );
addEventListener( "mouseleave", log.bind( this, "mouseleave" ) );
}
function log ( eventName ) {
document.body.appendChild(
document.createElement( "p" )
).textContent = eventName;
}
I'll see if the team already has an issue filed on this; 我将看看团队是否已经对此提出了问题; if we do not, I will ensure that it's tracked.
如果我们不这样做,我将确保对其进行跟踪。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.