diff --git a/framework/core/js/src/forum/components/DiscussionListItem.tsx b/framework/core/js/src/forum/components/DiscussionListItem.tsx index da7df0515b..cd1b09e0b2 100644 --- a/framework/core/js/src/forum/components/DiscussionListItem.tsx +++ b/framework/core/js/src/forum/components/DiscussionListItem.tsx @@ -24,6 +24,7 @@ import type { DiscussionListParams } from '../states/DiscussionListState'; export interface IDiscussionListItemAttrs extends ComponentAttrs { discussion: Discussion; params: DiscussionListParams; + slidable?: boolean; } /** @@ -57,7 +58,7 @@ export default class DiscussionListItem) { super.oncreate(vnode); // If we're on a touch device, set up the discussion row to be slidable. // This allows the user to drag the row to either side of the screen to // reveal controls. - if ('ontouchstart' in window) { + if (this.isSlidableEnabled()) { const slidableInstance = slidable(this.element); this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());