OSDN Git Service
(root)
/
keitairc
/
keitairc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e3cbbb
)
fix click event handling on iOS4
author
ISHIKAWA Mutsumi
<ishikawa@hanzubon.jp>
Tue, 22 Jun 2010 12:27:54 +0000
(21:27 +0900)
committer
ISHIKAWA Mutsumi
<ishikawa@hanzubon.jp>
Tue, 22 Jun 2010 12:27:54 +0000
(21:27 +0900)
data/public/iscroll/iscroll.js
patch
|
blob
|
history
diff --git
a/data/public/iscroll/iscroll.js
b/data/public/iscroll/iscroll.js
index
91f85bc
..
e7d56d6
100644
(file)
--- a/
data/public/iscroll/iscroll.js
+++ b/
data/public/iscroll/iscroll.js
@@
-225,6
+225,10
@@
iScroll.prototype = {
}
if (!this.moved) {
+ /* iOS4 では touchStart イベントは preventDefault() してないので
+ click イベントを発生させちゃうと 2重にクリックが発生したような
+ 状態になるので、スルーでいい */
+ if (!navigator.appVersion.match(/iPhone OS 4/)) {
// Find the last touched element
var theTarget = e.changedTouches[0].target;
if (theTarget.nodeType == 3) {
@@
-238,6
+242,8
@@
iScroll.prototype = {
e.button, e.relatedTarget);
theTarget.dispatchEvent(theEvent);
return false;
+ }
+ return true;
}
var time = e.timeStamp - this.scrollStartTime;