Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix touch functionality in Edge #50

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use single quotes here 'PointerEvent'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to be clear, you want to use double quotes on "ontouchstart" and single quotes on \'PointerEvent\'?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickkettner Oh dam it...didn't realize that! So all my comments below are obsolet. Sorry man ✌️

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem! Did you still want a changelog update?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would be nice!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the changelog as well as the relevant version numbers.

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