admin管理员组文章数量:1289352
I have a <select>
element with the multiple="multiple"
attribute. In Chrome (v27), the change()
event is getting triggered when the user scrolls by clicking and dragging using the mouse. Once a value has been selected, the problem ceases to exist.
Example Markup
<select multiple="multiple">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
Example jQuery
$('select').on('change', function() {
alert('Changed!');
});
Is this a bug with Chrome? I've tried searching but haven't e across anything.
Here's a fiddle
I have a <select>
element with the multiple="multiple"
attribute. In Chrome (v27), the change()
event is getting triggered when the user scrolls by clicking and dragging using the mouse. Once a value has been selected, the problem ceases to exist.
Example Markup
<select multiple="multiple">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
Example jQuery
$('select').on('change', function() {
alert('Changed!');
});
Is this a bug with Chrome? I've tried searching but haven't e across anything.
Here's a fiddle
Share Improve this question edited Jun 4, 2013 at 7:05 billyonecan asked Jun 3, 2013 at 15:19 billyonecanbillyonecan 20.3k9 gold badges44 silver badges65 bronze badges 8- I can't replicate it in Chrome (also v27) – dsgriffin Commented Jun 3, 2013 at 15:22
- @Zenith really? I'm using v27.0.1453.94m (apparently the latest version) and Windows 7 (though I didn't think the OS would be applicable) – billyonecan Commented Jun 3, 2013 at 15:24
- @billyonecan I'm exactly the same version and on Windows 7 too :/ weird – dsgriffin Commented Jun 3, 2013 at 15:25
- @Zenith that's very strange indeed :| – billyonecan Commented Jun 3, 2013 at 15:25
- @billyonecan i am using Version 27.0.1453.94 m with Windows7 can't replicate either. But seems to be a bug looking at PSR answer. – PSL Commented Jun 3, 2013 at 15:26
1 Answer
Reset to default 12It is the bug in chrome
SELECT box with MULTIPLE option fires ONCHANGE event on scroll
and here
本文标签: javascriptChrome Scroll on ltselectgt triggers change() eventStack Overflow
版权声明:本文标题:javascript - Chrome: Scroll on <select> triggers change() event - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741475487a2380856.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论