diff --git a/framework/core/js/src/forum/components/DiscussionListItem.tsx b/framework/core/js/src/forum/components/DiscussionListItem.tsx index b5d4825c24..df19c67b74 100644 --- a/framework/core/js/src/forum/components/DiscussionListItem.tsx +++ b/framework/core/js/src/forum/components/DiscussionListItem.tsx @@ -29,6 +29,7 @@ export interface IDiscussionListItemAttrs extends ComponentAttrs { params: DiscussionListParams; jumpTo?: number; author?: User; + slidable?: boolean; } /** @@ -62,7 +63,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());