FIX: The docked back button didn't work so well on iPad / short topics
This commit is contained in:
parent
2b808ad9da
commit
8757ae3b92
|
@ -79,7 +79,9 @@ createWidget('timeline-scroller', {
|
||||||
},
|
},
|
||||||
|
|
||||||
dragEnd(e) {
|
dragEnd(e) {
|
||||||
if (!$(e.target).is('button')) {
|
if ($(e.target).is('button')) {
|
||||||
|
this.sendWidgetAction('goBack');
|
||||||
|
} else {
|
||||||
this.sendWidgetAction('commit');
|
this.sendWidgetAction('commit');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,9 +169,14 @@ createWidget('timeline-scrollarea', {
|
||||||
|
|
||||||
if (hasBackPosition) {
|
if (hasBackPosition) {
|
||||||
const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT);
|
const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT);
|
||||||
showButton = ((lastReadTop < before - (SCROLLER_HEIGHT * 0.5)) ||
|
showButton = ((before + SCROLLER_HEIGHT - 5) < lastReadTop) ||
|
||||||
(lastReadTop > (before + SCROLLER_HEIGHT))) &&
|
(before > (lastReadTop + 25));
|
||||||
(lastReadTop < (SCROLLAREA_HEIGHT - SCROLLER_HEIGHT));
|
|
||||||
|
// Don't show if at the bottom of the timeline
|
||||||
|
if (lastReadTop < (SCROLLAREA_HEIGHT - SCROLLER_HEIGHT)) {
|
||||||
|
showButton = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = [
|
const result = [
|
||||||
|
|
Loading…
Reference in New Issue