mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:04:11 +08:00
FIX: disabled topic timeline panning on desktop
This commit is contained in:
parent
c754ece8f5
commit
b4cb31d999
|
@ -4,19 +4,27 @@ export default Ember.Mixin.create({
|
||||||
_panState: null,
|
_panState: null,
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this.$()
|
this._super();
|
||||||
.on("pointerdown", e => this._panStart(e))
|
|
||||||
.on("pointermove", e => this._panMove(e))
|
if (this.site.mobileView) {
|
||||||
.on("pointerup", e => this._panMove(e))
|
this.$()
|
||||||
.on("pointercancel", e => this._panMove(e));
|
.on("pointerdown", e => this._panStart(e))
|
||||||
|
.on("pointermove", e => this._panMove(e))
|
||||||
|
.on("pointerup", e => this._panMove(e))
|
||||||
|
.on("pointercancel", e => this._panMove(e));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
this.$()
|
this._super();
|
||||||
.off("pointerdown")
|
|
||||||
.off("pointerup")
|
if (this.site.mobileView) {
|
||||||
.off("pointermove")
|
this.$()
|
||||||
.off("pointercancel");
|
.off("pointerdown")
|
||||||
|
.off("pointerup")
|
||||||
|
.off("pointermove")
|
||||||
|
.off("pointercancel");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_calculateNewPanState(oldState, e) {
|
_calculateNewPanState(oldState, e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user