<select> 在 Opera Mini 上单击时重新加载页面
<select> reloads page when clicked on Opera Mini
在 Opera Mini 中单击带有 border:none;
和 cursor:pointer
的 <select>
元素会重新加载页面。最小示例:
select {
cursor: pointer;
border: none;
}
<select>
<option value="1">English</option>
<option value="2">Mathematics</option>
<option value="3">Social Studies</option>
<option value="4">Business</option>
</select>
除了删除其中一个 CSS 属性或将边框更改为 solid transparent 1px
之外,还有谁知道更好的修复方法?
这是一个cursor: pointer;
feature。如果您点击 pointer
区域 opera mini 将页面发送到服务器以 [=17=] javascript 事件委托。
Event Delegation in Opera Mini
Until recently,Event delegation didn’t work in Opera Mini. Now it’s
implemented by the Server sending clickable areas to the client for
anything with cursor:pointer. Delegation mostly works as expected with
click events with the exception of form elements; it’s rather hard to
detect whether using them should trigger an event (and thus a server
round trip) or not, unless an event listener is attached directly to
them. A workaround is to add a dummy event listener to required form
element.
在 Opera Mini 中单击带有 border:none;
和 cursor:pointer
的 <select>
元素会重新加载页面。最小示例:
select {
cursor: pointer;
border: none;
}
<select>
<option value="1">English</option>
<option value="2">Mathematics</option>
<option value="3">Social Studies</option>
<option value="4">Business</option>
</select>
除了删除其中一个 CSS 属性或将边框更改为 solid transparent 1px
之外,还有谁知道更好的修复方法?
这是一个cursor: pointer;
feature。如果您点击 pointer
区域 opera mini 将页面发送到服务器以 [=17=] javascript 事件委托。
Event Delegation in Opera Mini
Until recently,Event delegation didn’t work in Opera Mini. Now it’s implemented by the Server sending clickable areas to the client for anything with cursor:pointer. Delegation mostly works as expected with click events with the exception of form elements; it’s rather hard to detect whether using them should trigger an event (and thus a server round trip) or not, unless an event listener is attached directly to them. A workaround is to add a dummy event listener to required form element.