anima-yocto-touch
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "anima-yocto-touch", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "the touch from yocto", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -321,3 +321,18 @@ var $ = require('anima-yocto-lite'); | ||
document.addEventListener('click', function(event) { | ||
// document.addEventListener('click', function(event) { | ||
// if (!event.animaClick) {//阻止浏览器自己触发的点击事件 | ||
// if (event.stopImmediatePropagation) { | ||
// event.stopImmediatePropagation(); | ||
// } else { | ||
// event.propagationStopped = true; | ||
// } | ||
// event.stopPropagation() | ||
// event.preventDefault() | ||
// return false | ||
// } | ||
// }, true) | ||
$(document).on('click', function(event){ | ||
if (!event.animaClick) {//阻止浏览器自己触发的点击事件 | ||
@@ -335,3 +350,3 @@ if (event.stopImmediatePropagation) { | ||
} | ||
}, true) | ||
}) | ||
} | ||
@@ -338,0 +353,0 @@ |
var expect = require('spm-expect.js'); | ||
var $ = require('anima-yocto-lite'); | ||
require('../index'); | ||
require('../index-debug') | ||
require('../index') | ||
$('<style>.container{position:relative;}.tap{width:100px;height:100px;position:absolute;left:1;top:1;}.click{width:200px;height:200px;text-align:right;}.red{background:red;}.blue{background:blue;}.normaltap{width:100px;height:100px;}</style>').appendTo('head') | ||
@@ -38,3 +40,3 @@ | ||
'<br/>' + | ||
'<select onclick="alert(\'select 1\')" name="">' + | ||
'<select name="">' + | ||
'<option value="1">等额本息6月</option>' + | ||
@@ -46,3 +48,3 @@ '<option value="2">等额本金12个月</option>' + | ||
'<br/>' + | ||
'<select onclick="alert(\'select 2\')">' + | ||
'<select>' + | ||
'<option value="">不使用任何优惠</option>' + | ||
@@ -97,2 +99,14 @@ '<option value="1">首贷有礼(仅限首次使用)</option>' + | ||
'<br/>' + | ||
'<br/>' + | ||
'<div id="JS_Log">默认行为元素</div>' + | ||
'<input type="radio" />'+ | ||
'<br/>' + | ||
'<a href="http://www.taobao.com">淘宝</a>' + | ||
'<br/>' + | ||
'checkbox' + | ||
'<br/>' + | ||
'<br/>' + | ||
'<br/>' + | ||
'<br/>' + | ||
'<br/>' + | ||
'<br/>' | ||
@@ -109,3 +123,3 @@ ).prependTo('body') | ||
$('<a id="J_initEvent">模拟事件测试</a><br/><br/>').prependTo('body') | ||
$('<a id="J_initEvent" href="javascript:;">模拟事件测试</a><br/><br/>').prependTo('body') | ||
@@ -179,11 +193,15 @@ $('<a style="display:block; width:100%; height: 2000px; background-color: red;" href="http://www.taobao.com">测试快速滑动的问题</a><br/><br/>').prependTo('body') | ||
$('#J_initEvent').click(function(event){ | ||
alert(event.animaClick) | ||
}) | ||
$('#J_initEvent') | ||
.tap(function(){ | ||
alert('tap') | ||
}) | ||
.click(function(event){ | ||
alert('event.animaClick') | ||
}) | ||
var ev = document.createEvent('HTMLEvents'); | ||
ev.initEvent('click', false, true) | ||
$('#J_initEvent').get(0).dispatchEvent(ev) | ||
// var ev = document.createEvent('HTMLEvents'); | ||
// ev.initEvent('click', false, true) | ||
// $('#J_initEvent').get(0).dispatchEvent(ev) | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
23365
516
0