projects
/
reveal.js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faecabd
)
fixed issue with links on touch devices (tap wasn't working)
author
Hakim El Hattab
<hakim.elhattab@gmail.com>
Thu, 23 Jun 2011 07:05:53 +0000
(09:05 +0200)
committer
Hakim El Hattab
<hakim.elhattab@gmail.com>
Thu, 23 Jun 2011 07:05:53 +0000
(09:05 +0200)
js/slideshow.js
patch
|
blob
|
history
diff --git
a/js/slideshow.js
b/js/slideshow.js
index 8165a40b21a89df1da56fb87b4d7d9e549f0eb19..bd6ae28e9158e96a4eaf6025207ff1b1823c6087 100644
(file)
--- a/
js/slideshow.js
+++ b/
js/slideshow.js
@@
-104,9
+104,13
@@
var Slideshow = (function(){
* @param {Object} event
*/
function onDocumentTouchStart( event ) {
-
// We're only interested in one point taps
- if (event.touches.length == 1) {
+ if (event.touches.length === 1) {
+ // Never prevent taps on anchors and images
+ if( event.target.tagName.toLowerCase() === 'a' || event.target.tagName.toLowerCase() === 'img' ) {
+ return;
+ }
+
event.preventDefault();
var point = {