Skip to content

Commit f3b4171

Browse files
committed
small bugfix
1 parent 2e2056f commit f3b4171

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hammer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ function Hammer(element, options, undefined)
3535

3636
// some css hacks
3737
var vendors = ['-webkit-','-moz-','-ms-','-o-',''];
38-
var css = '';
38+
var css = element.getAttribute('style') || '';
3939
var css_props = {
4040
"user-select": "none",
4141
"touch-callout": "none",
4242
"user-drag": "none",
4343
"tap-highlight-color": "rgba(0,0,0,0)"
4444
};
45-
45+
4646
for(i = 0; i < vendors.length; i++) {
4747
if(supports(vendors[i] + 'user-select')) {
4848
for(var prop in css_props) {
@@ -236,7 +236,7 @@ function Hammer(element, options, undefined)
236236
_gesture = 'drag';
237237

238238
var position = { x: _pos.move[0].x - _offset.left,
239-
y: _pos.move[0].y - _offset.top };
239+
y: _pos.move[0].y - _offset.top };
240240

241241
var event_obj = {
242242
originalEvent : event,

0 commit comments

Comments
 (0)