# \[New Plugin\] LongPressMe (long press on mobile)

**URL:** <https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663>\
**Category:** Plugins\
**Created:** [October 17, 2023, 5:28pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663 "2023-10-17T17:28:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [October 17, 2023, 5:28pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/1 "2023-10-17T17:28:39Z")

</div>

Finally a long press that works

I finally released a plugin that enables long press on mobile.  
It also disables any selection, like text, when long pressing.

You can test [the plugin](https://bubble.io/plugin/longpressme-1684059024341x989187733970747400) clicking on the [demo](https://longpressme-preview.bubbleapps.io/version-test)

![Free_Iphone_14_Pro_Mockup_5](https://us1.discourse-cdn.com/bubble/original/3X/2/8/28e2033f3974e5d52686a07fcf0df58b07aed9fb.gif)

Let me know what you think  
ZDS

---

<div class="post-metadata">

**Author:** ![dtm2023](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dtm2023](https://forum.bubble.io/u/dtm2023)\
**Post date:** [January 4, 2024, 4:58pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/2 "2024-01-04T16:58:31Z")

</div>

Struggling to get this to work correctly in a RG to create a long press conditional on rg cells

Longpress sets state of current cell index however it doesn’t work properly on any cell other than index 1.

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [January 8, 2024, 1:32pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/3 "2024-01-08T13:32:31Z")

</div>

Heyhey @dtm2023  
You can solve this problem adding not only the ID Attribute name you choose (in my example the word “longpress”), but also the “Current cell’ index” Dynamic Data.

![Screenshot 2024-01-08 at 14.29.42](https://us1.discourse-cdn.com/bubble/original/3X/6/a/6a41d7935264eb345338c0f503378182734ff746.png)

Like that, you can Duplicate as many LongPressMe elements as you need, give for each, as ID Attribute Element, the word longpress + index nr. and then create a Worklow for any of them.

![Screenshot 2024-01-08 at 14.32.03](https://us1.discourse-cdn.com/bubble/original/3X/f/3/f31717b3e3609f140e8fd113e62a8396a37fe567.png)

Does this solve your issue?

---

<div class="post-metadata">

**Author:** ![dtm2023](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dtm2023](https://forum.bubble.io/u/dtm2023)\
**Post date:** [January 8, 2024, 3:46pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/5 "2024-01-08T15:46:15Z")

</div>

**Yes. Thank you!**

The longpressme element was inside the repeating group so it was creating a conflict.  
Setting the ID attribute to include the cell index removed the conflict.

Thanks for the tip.

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [January 8, 2024, 4:02pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/6 "2024-01-08T16:02:12Z")

</div>

Amazing!  
Thanks for posting, I hope it will also be of help for other people in the future.

---

<div class="post-metadata">

**Author:** ![dtm2023](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dtm2023](https://forum.bubble.io/u/dtm2023)\
**Post date:** [January 8, 2024, 4:57pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/7 "2024-01-08T16:57:22Z")

</div>

Any tips on how to get around this problem?

I am using long press as a selection tool.  
When I long press on a cell it adds it to a list (only when list doesn’t contain)  
I have a separate workflow that removes from list when long pressed (only when list contains item)

It seems there is not enough of a “reset” so both workflows run back to back even though I have only performed one long press. Long press doesn’t seem to detect when group is released so it records another long press unless my timing is perfect.

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [January 8, 2024, 5:11pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/8 "2024-01-08T17:11:33Z")

</div>

Normally this can be fixed adding the object inside a Group and then use the Reset Group. Have you already tried it?

---

<div class="post-metadata">

**Author:** ![dtm2023](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dtm2023](https://forum.bubble.io/u/dtm2023)\
**Post date:** [January 8, 2024, 5:52pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/9 "2024-01-08T17:52:53Z")

</div>

Haven’t tried resetting – ultimately went a different route:

I changed the UX on my approach so that I do not need to longpress again on the item to remove it. Instead, longpressme initiates “selection mode” - once selection mode is on - a single click adds or removes selected items.

Thanks for your tips – the plugin works great so far.

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [April 8, 2024, 8:29pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/10 "2024-04-08T20:29:10Z")

</div>

🎁 **Giveaway Alert!**

In a bid to encourage reviews for the plugin, I’m offering my other plugin, “[Swipe left/right/up/down Me](https://bubble.io/plugin/swipe-leftrightupdown-me-1683446675625x651228597438906400),” which facilitates various swipe actions on mobile devices, completely free!

If you’ve bought or are planning to buy this plugin, simply leave a comment on the plugin page, send me a message with proof of your purchase (a subscription won’t do), along with your comment, and I’ll grant you access to the other plugin at no cost.

This giveaway is up for grabs until the 8th of May.

Don’t miss out! 🌟

---

<div class="post-metadata">

**Author:** ![gaetan.douvier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gaetan.douvier/32/115752_2.png) [@gaetan.douvier](https://forum.bubble.io/u/gaetan.douvier)\
**Post date:** [April 9, 2024, 12:04pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/11 "2024-04-09T12:04:55Z")

</div>

Hi ZDS,  
I just bought your plugin (and leave a comment 😉 ). I’ve an issue with the set up.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/9/b9fc718c2b6f44b31fbecd2c4e7e94248add401e.png)  
I have this message in the debugger and I don’t know where it comes from.

Thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [April 10, 2024, 9:34am UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/12 "2024-04-10T09:34:51Z")

</div>

Hey Gaetan,  
Thank you for your review! Please DM me with the name of your application, so I can authorise it for the free Swipe plugin.

Regarding your, issue, I don’t know where is coming from. Can you maybe check if there is any empty workflow? Or maybe you have a empty LongPressMe element?

---

<div class="post-metadata">

**Author:** ![dbom009](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbom009/32/259579_2.png) [@dbom009](https://forum.bubble.io/u/dbom009)\
**Post date:** [May 6, 2024, 2:43pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/13 "2024-05-06T14:43:29Z")

</div>

@ZDS Hello, great plugin. I am seeming to get this error and it is causing issues in my app. Do you know what may be causing this?

 ![Screenshot 2024-05-06 at 10.43.23 AM](https://us1.discourse-cdn.com/bubble/original/3X/8/3/83d8d893199eda0b87553b3abe737265c0efacac.png)

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [May 6, 2024, 2:56pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/14 "2024-05-06T14:56:38Z")

</div>

Hi @dbom009  
Are you able to replicate this issue in a page I can access? So I can check where it could be coming from

---

<div class="post-metadata">

**Author:** ![dbom009](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbom009/32/259579_2.png) [@dbom009](https://forum.bubble.io/u/dbom009)\
**Post date:** [May 6, 2024, 3:14pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/15 "2024-05-06T15:14:09Z")

</div>

This looks to be happening to the other user above as well @ZDS.  
I opened a fresh page and just placed the element in a repeating group and it produces an error.

 ![Screenshot 2024-05-06 at 11.13.43 AM](https://us1.discourse-cdn.com/bubble/original/3X/9/b/9bfcdec05a0787ed0481abac713c243cdabd337a.png)

 ![Screenshot 2024-05-06 at 11.14.02 AM](https://us1.discourse-cdn.com/bubble/original/3X/d/c/dcfed93daf4921ce63a58438f43379a8581ffdee.png)

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [May 6, 2024, 3:43pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/16 "2024-05-06T15:43:54Z")

</div>

I understand the issue now. If you place the LongPressMe A inside the repeating group, then this happens. I think because bubble has issue on finding the element.  
You can place it outside the repeating group instead.

Check here how I 've used the plugin with a repeating group: [Longpressme-preview | Bubble Editor](https://bubble.io/page?type=page&name=mobile_index_rg&id=longpressme-preview&tab=tabs-1&subtab=Plan)

---

<div class="post-metadata">

**Author:** ![dbom009](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbom009/32/259579_2.png) [@dbom009](https://forum.bubble.io/u/dbom009)\
**Post date:** [May 6, 2024, 3:56pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/17 "2024-05-06T15:56:41Z")

</div>

Hmm I see. I have used other plugins that work inside repeating groups and have not had this issue before.

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [May 6, 2024, 4:27pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/18 "2024-05-06T16:27:18Z")

</div>

I’ll see if I can do something on the code.  
Will probably take some time to resolve.

---

<div class="post-metadata">

**Author:** ![dbom009](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbom009/32/259579_2.png) [@dbom009](https://forum.bubble.io/u/dbom009)\
**Post date:** [May 6, 2024, 4:29pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/19 "2024-05-06T16:29:42Z")

</div>

Ok, thank you. I would love to keep using it. But I took it out of the RG and its still making this error happen when pressed.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/a/baa47fa54d9948eed6f597d6e2403677eb7fdc8a.png)

---

<div class="post-metadata">

**Author:** ![drixxon](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/drixxon/32/90231_2.png) [@drixxon](https://forum.bubble.io/u/drixxon)\
**Post date:** [October 30, 2024, 4:52am UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/20 "2024-10-30T04:52:24Z")

</div>

@ZDS is there a reason why this plugin is no longer available on the store? was working perfect for me.

---

<div class="post-metadata">

**Author:** ![ZDS](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zds/32/191246_2.png) [@ZDS](https://forum.bubble.io/u/ZDS)\
**Post date:** [October 31, 2024, 11:12pm UTC](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663/21 "2024-10-31T23:12:36Z")

</div>

thanks for letting me know.  
don’t really know why. I now released a new version, let’s see if it’s now fixed.

[Next page](https://forum.bubble.io/t/new-plugin-longpressme-long-press-on-mobile/288663.md?page=2)
