Skip to content

Commit a69531c

Browse files
committed
Emulate short click for mobile
1 parent 527c2b4 commit a69531c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

plugins/Sidebar/media/Sidebar.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class Sidebar extends Class
5555
@fixbutton_addx = @fixbutton.offset().left-mousex
5656
@startDrag()
5757
@fixbutton.parent().on "click touchend touchcancel", (e) =>
58+
if (+ new Date)-@dragStarted < 100
59+
window.top.location = @fixbutton.find(".fixbutton-bg").attr("href")
5860
@stopDrag()
5961
@resized()
6062
$(window).on "resize", @resized

plugins/Sidebar/media/all.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
}).call(this);
5858

5959

60-
6160
/* ---- plugins/Sidebar/media/RateLimit.coffee ---- */
6261

6362

@@ -87,7 +86,6 @@
8786
}).call(this);
8887

8988

90-
9189
/* ---- plugins/Sidebar/media/Scrollable.js ---- */
9290

9391

@@ -260,6 +258,9 @@ window.initScrollable = function () {
260258
})(this));
261259
this.fixbutton.parent().on("click touchend touchcancel", (function(_this) {
262260
return function(e) {
261+
if ((+(new Date)) - _this.dragStarted < 100) {
262+
window.top.location = _this.fixbutton.find(".fixbutton-bg").attr("href");
263+
}
263264
return _this.stopDrag();
264265
};
265266
})(this));
@@ -647,6 +648,13 @@ window.initScrollable = function () {
647648
});
648649
};
649650
})(this));
651+
this.tag.find(".close").off("click touchend").on("click touchend", (function(_this) {
652+
return function(e) {
653+
_this.startDrag();
654+
_this.stopDrag();
655+
return false;
656+
};
657+
})(this));
650658
return this.loadGlobe();
651659
};
652660

0 commit comments

Comments
 (0)