Skip to content

A platform for community discussion. Free, open, simple.

UX: allow horizontal overflow on mobile (#38058)

chapoi535c57cb7a5b
diff --git a/frontend/discourse/app/components/horizontal-overflow-nav.gjs b/frontend/discourse/app/components/horizontal-overflow-nav.gjs
index 276b5bf1f45..0916841a4e7 100644
--- a/frontend/discourse/app/components/horizontal-overflow-nav.gjs
+++ b/frontend/discourse/app/components/horizontal-overflow-nav.gjs
@@ -3,15 +3,12 @@ import { tracked } from "@glimmer/tracking";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
-import { service } from "@ember/service";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import { bind } from "discourse/lib/decorators";
import onResize from "discourse/modifiers/on-resize";
export default class HorizontalOverflowNav extends Component {
- @service site;
-
@tracked hasScroll;
@tracked hideRightScroll = false;
@tracked hideLeftScroll = true;
@@ -30,10 +27,6 @@ export default class HorizontalOverflowNav extends Component {
@bind
onResize(entries) {
- if (this.site.mobileView) {
- return;
- }
-
const element = entries[0].target;
this.watchScroll(element);
this.hasScroll = element.scrollWidth > element.offsetWidth;
@@ -46,10 +39,6 @@ export default class HorizontalOverflowNav extends Component {
@bind
onScroll(event) {
- if (this.site.mobileView) {
- return;
- }
-
this.watchScroll(event.target);
}
@@ -78,7 +67,7 @@ export default class HorizontalOverflowNav extends Component {
@bind
scrollDrag(event) {
- if (this.site.mobileView || !this.hasScroll) {
+ if (!this.hasScroll) {
return;
}