# Topic Preview Modal

**URL:** https://meta.discourse.org/t/topic-preview-modal/409712
**Category:** Theme component
**Created:** [August 10, 2026, 3:54pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712 "2026-08-10T15:54:59Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 6:54am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/41 "2026-08-27T06:54:26Z")

</div>

Yeah, I think that’s because iPad isn’t considered a mobile device in Discourse. I’ve changed the detection to be viewport-based. Can you try it again?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 27, 2026, 10:15am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/42 "2026-08-27T10:15:11Z")

</div>

Yeah, tablets are pain in the tender places. But now it doesn’t follow any gestures and X is the only way to close the modal.

Personally… for me it’s good enough too. Plus tablets, specially iPad, cover quite shy share of devices, so I’m not so sure if there is real need to spend too much time to try adjust those — even tablets are de facto mobiles and desktop style devices only by size.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 10:24am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/43 "2026-08-27T10:24:03Z")

</div>

Yeah, just to clarify: these dismiss gestures are only enabled for the mobile modal. The desktop modal is not affected at all and still works exactly as before.

So the **None/Grip/Gesture** options only change the behavior on mobile-sized viewports. Desktop users will still use the normal existing modal behavior (X button or click outside).

Desktop modal (swipe won’t work)

 ![Screenshot 2026-08-27 at 12.20.14](https://global.discourse-cdn.com/meta/original/4X/a/a/5/aa574b9087b68f6490cdd2f3439aed32cac80332.png)

Mobile modal (swipe should work)

 ![Screenshot 2026-08-27 at 12.21.13](https://global.discourse-cdn.com/meta/original/4X/8/6/2/862ab7268d794846b873f387a839935a7fc20350.png)

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 3:48pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/44 "2026-08-27T15:48:55Z")

</div>

> [@Topic Preview Modal](https://meta.discourse.org/t/topic-preview-modal/409712/39):
>
> Hello waving_hand I’ve been thinking about this a lot, and I added three configurable options: None: no additional dismiss gesture Grip: a visual grip is shown in the footer Gesture: the modal can be dismissed by swiping down when at the top, or swiping up when at the bottom. The native Back gesture/button also dismisses the modal on mobile. I tried to make it work somewhat like Facebook’s comment modals. The most interesting part is the native Back handling. Rather than navigating away f…

Just a little follow-up 😊

I’d really appreciate a few more people testing it on their phones. Thanks!

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 27, 2026, 6:29pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/45 "2026-08-27T18:29:08Z")

</div>

iPhone 15+, latest iOS, the hub/PWA/Safari:

From left to right it’s quite difficult to find the right place. But I think it comes from the device itself, because it has happened with other apps/sites too everynowandthen. But out there is solutions too where it doesn’t care from where swiping starts.

Discourse itself is easy to swipe back, though.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 6:50pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/46 "2026-08-27T18:50:40Z")

</div>

Thanks @Jagster, just to clarify, when you use the swipe-back gesture while the Topic Preview Modal is open, does it close the modal and keep you on the topic list, or does it navigate back to the previous page?

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [August 27, 2026, 8:36pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/47 "2026-08-27T20:36:51Z")

</div>

> [@Don](#):
>
> I’d really appreciate a few more people testing it on their phones. Thanks!

I can confirm that the back gesture and swipe up/down are working on Android 17 (AOSP) ✊

A minor detail: the animation is a little sketchy/slow.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 8:39pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/48 "2026-08-27T20:39:43Z")

</div>

Thanks for testing! 🙌

When you say the animation is a little sketchy/slow, do you mean the swipe up dismissal animation?

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [August 27, 2026, 9:05pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/49 "2026-08-27T21:05:29Z")

</div>

> [@Don](#):
>
> When you say the animation is a little sketchy/slow, do you mean the swipe up dismissal animation?

Exactly, the rest are super smooth! It is a pleasure to test your creations, boss.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 9:41pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/50 "2026-08-27T21:41:16Z")

</div>

Thank you, I fixed it! Please check it again. 🙂

---

<div class="post-metadata">

### Author: ![Damian\_Boon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/damian_boon/32/574032_2.png) [@Damian\_Boon](https://meta.discourse.org/u/Damian_Boon)
#### Post date: [August 27, 2026, 10:09pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/51 "2026-08-27T22:09:36Z")

</div>

Cant wait get back test this. Super excited lol

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [August 27, 2026, 10:19pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/52 "2026-08-27T22:19:02Z")

</div>

Neat, thanks to you! It improved the swipe down and back gestures; they are super smooth now.

Being honest, the swipe up seems to still be like before. It is minor, but you know, there are different devices, and this is on Android 17 for your record.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2026, 10:23pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/53 "2026-08-27T22:23:35Z")

</div>

> [@satonotdead](#):
>
> the swipe up seems to still be like before

Ah, thanks! Could you make a quick screen recording of the swipe-up dismiss? I’d like to see exactly where the animation feels off. It’s smooth on my Android 16 device.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 28, 2026, 6:28am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/54 "2026-08-28T06:28:27Z")

</div>

When the modal is open, and I do _swipe back_, it does close the modal indeed. The issue is it success only after fifth or so try. So it does nothing when the modal is open, but when it acts, it does what is expected.

---

<div class="post-metadata">

### Author: ![kddkd](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@kddkd](https://meta.discourse.org/u/kddkd)
#### Post date: [August 28, 2026, 6:35am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/55 "2026-08-28T06:35:46Z")

</div>

The Safari browser experience on iOS 27 is fantastic! Thanks for your hard work! ❤

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 28, 2026, 7:26am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/56 "2026-08-28T07:26:20Z")

</div>

> [@Jagster](#):
>
> issue is it success only after fifth or so try

Now I realize what is the issue with iPhone: swipe back works only if used header area of the topic.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 28, 2026, 9:35am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/57 "2026-08-28T09:35:57Z")

</div>

Thanks everyone for testing! ❤

I’ve merged this: [FEATURE: Add configurable mobile modal dismiss gestures - Pull Request #7 - VaperinaDEV/discourse-topic-preview-modal - GitHub](https://github.com/VaperinaDEV/discourse-topic-preview-modal/pull/7)

* * *

### Configurable mobile dismiss gestures

This update adds configurable dismiss options to the Topic Preview Modal:

- **None:** no additional dismiss gesture
- **Grip:** shows a visual grip in the modal footer
- **Gesture:** allows the modal to be dismissed with gestures:
  - swipe up when at the bottom
  - native mobile Back gesture/button

Swipe-down dismissal is available in all modes.

* * *

The native Back behavior is especially useful on mobile: instead of navigating away from the underlying topic list, the Back action closes the modal and keeps the user’s position in the list.

The desktop modal is not affected by these options.

* * *

If you find this useful, consider supporting its continued development. ❤  
[\> ./support --coffee](https://meta.discourse.org/u/don)

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 28, 2026, 12:07pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/58 "2026-08-28T12:07:17Z")

</div>

I’ve also added optional haptic feedback for the Topic Preview Modal: [FEATURE: Add haptic feedback to modal open and close - Pull Request #8 - VaperinaDEV/discourse-topic-preview-modal - GitHub](https://github.com/VaperinaDEV/discourse-topic-preview-modal/pull/8)

When enabled, supported Android devices will provide:

- a subtle haptic feedback when opening the modal
- a slightly stronger feedback when closing the modal

The feedback can be enabled or disabled with the new **Haptic feedback** (`modal_haptic_feedback`) setting.

The default is **enabled**.

The haptic durations are intentionally different for opening and closing to make the two interactions feel distinct.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 29, 2026, 8:27am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/59 "2026-08-29T08:27:21Z")

</div>

Hello 👋

I’ve added one missing feature: [FEATURE: Add topic progress bar (timeline) - Pull Request #9 - VaperinaDEV/discourse-topic-preview-modal - GitHub](https://github.com/VaperinaDEV/discourse-topic-preview-modal/pull/9)

 ![Screenshot 2026-08-29 at 10.26.58](https://global.discourse-cdn.com/meta/original/4X/c/6/9/c69a55b601974cd118cd46e5ee9754434b40274f.png)

Also, added to skeleton loader when jump to post: [DEV: Enhance post jump handling with jumpingToPost state · VaperinaDEV/discourse-topic-preview-modal@44f6d3a · GitHub](https://github.com/VaperinaDEV/discourse-topic-preview-modal/commit/44f6d3afe0f67975fe15f85567aeb58f4c1313cf)

[\> ./support --coffee](https://meta.discourse.org/u/don) ❤

---

<div class="post-metadata">

### Author: ![Damian\_Boon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/damian_boon/32/574032_2.png) [@Damian\_Boon](https://meta.discourse.org/u/Damian_Boon)
#### Post date: [August 30, 2026, 4:15pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712/60 "2026-08-30T16:15:57Z")

</div>

There is a bug when replying (nested view) the topic attempts to reload but gets stuck

 ![Screenshot 2026-08-30 171455](https://global.discourse-cdn.com/meta/original/4X/7/7/a/77afc5180a2fb380b713ccd4f2e5b2a6286c563d.png)

[Previous page](https://meta.discourse.org/t/topic-preview-modal/409712.md?page=2)

[Next page](https://meta.discourse.org/t/topic-preview-modal/409712.md?page=4)
