Skip to content

Commit

Permalink
fix touch functionality in Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkettner committed Aug 14, 2015
1 parent c92dd72 commit 3d3b29e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* Code style refactoring
* #16: Wrap js libs in IIFEs

### 0.8.1 - 2015-08-14
* Update touch support detection for Edge

### 0.8.0 - 2014-07-22
* Clean up documentation and featureRequest
* Create separate CHANGELOG file
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function(grunt) {
header: '+function ($) {\n' +
' "use strict";\n' +
'\n' +
' if (!("ontouchstart" in window || navigator.msMaxTouchPoints)) return false \n\n',
' if (!("ontouchstart" in window || "PointerEvent" in window || navigator.msMaxTouchPoints)) return false \n\n',
footer: '}(window.jQuery);'
},

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-touch-carousel",
"version": "0.8.0",
"version": "0.8.1",
"homepage": "https://github.com/ixisio/bootstrap-touch-carousel",
"authors": [
"Andreas Klein",
Expand Down
4 changes: 2 additions & 2 deletions dist/css/bootstrap-touch-carousel.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/js/bootstrap-touch-carousel.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-touch-carousel",
"description": "A drop-in perfection for Twitter Bootstrap's Carousel (v3) to enable gestures on touch devices.",
"version": "0.8.0",
"version": "0.8.1",
"keywords": [
"bootstrap",
"touch",
Expand Down
2 changes: 1 addition & 1 deletion src/js/tests/unit/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function () {
// console.log( "ontouchstart" in window ? true: false); // return true in PhantomJS

test("Should run plugin because touchevents are enabled", function() {
var hasTouchEvents = ("ontouchstart" in window || navigator.msMaxTouchPoints) ? true : false;
var hasTouchEvents = ("ontouchstart" in window || "PointerEvent" in window || navigator.msMaxTouchPoints) ? true : false;
equal(hasTouchEvents, true, "touch events should be enabled")
ok(typeof $(document.body).carousel().data('touch-carousel') === "object", "TouchCarousel Plugin is running")
})
Expand Down
2 changes: 1 addition & 1 deletion src/js/touch-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Return whole plugin if touch is not supported
*/
if (!("ontouchstart" in window || navigator.msMaxTouchPoints)) return false;
if (!("ontouchstart" in window || "PointerEvent" in window || "navigator.msMaxTouchPoints)) return false;

// CONST
var NAMESPACE = 'touch-carousel';
Expand Down
2 changes: 1 addition & 1 deletion src/js/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Return whole plugin if touch is not supported
*/
if (!("ontouchstart" in window || navigator.msMaxTouchPoints)) {
if (!("ontouchstart" in window || "PointerEvent" in window || navigator.msMaxTouchPoints)) {
return false;
}

Expand Down

0 comments on commit 3d3b29e

Please sign in to comment.