Mobiscroll在Chrome中失败,在FF&;即
我称Mobiscroll为:Mobiscroll在Chrome中失败,在FF&;即,mobiscroll,Mobiscroll,我称Mobiscroll为: $(joInputField).scroller({ width: 60, wheels: wheels, // wheels variable has been defined above headerText: false, // false for production! onSelect: function(){ // event fired by BOTH s
$(joInputField).scroller({
width: 60,
wheels: wheels, // wheels variable has been defined above
headerText: false, // false for production!
onSelect: function(){ // event fired by BOTH set and cancel
var stDate = '';
var rawDate = $(joInputField).scroller('getValue');
// a bunch more code
Mobiscroll的这种设置在Firefox17和IE9中都可以正常工作。然而,它在Chrome 23中完全失败了。在Chrome中,当我点击输入框弹出Mobiscroller时,我甚至会得到一个页面刷新
点击事件是按应该的方式附加的,所以我认为这不是我的HTML页面中让Chrome感到不安的东西。而且,我在控制台中没有收到任何错误
我刚刚将Mobiscroll从1.5升级到2.3.1,这没有任何区别。在Chrome中仍然失败,在FF&IE中表现得很有魅力
有人有预感吗?好的,终于有时间去弄清楚了 以下是我的输入元素的配置方式:
<input id="mobiScroll" class="mobiscroll scroller" type="image" readonly="" value="5 07 05 19 5 5" name="mobiDick" src="<?php echo $options['assetsBase'] ?>/img/calendar-icon-40px2.png">
希望这能帮助一些人,在路上的某个地方…这还不够。请附加所有代码或创建一个JSFIDLE来演示问题。
// work around a Chrome quirk where focus event is not raised on input element:
joInputField.click(function() {
joInputField.trigger('focus');
});