# \[Solved\] What is this block backButtonPressed

**URL:** https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147
**Category:** Questions about Thunkable X
**Tags:** solved
**Created:** [November 16, 2019, 12:03pm UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147 "2019-11-16T12:03:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![danyklein](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@danyklein](https://community.thunkable.com/u/danyklein)
#### Post date: [November 16, 2019, 12:03pm UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/1 "2019-11-16T12:03:41Z")

</div>

Can anyone explain me this block please and tell me how it works thank’s I have a stack navigation

---

<div class="post-metadata">

### Author: ![Conor](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@Conor](https://community.thunkable.com/u/Conor)
#### Post date: [November 16, 2019, 6:37pm UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/2 "2019-11-16T18:37:06Z")

</div>

The block gets triggered when you press the back button on your device. It only works on Android as iOS doesn’t have a physical or on-screen back button.

> **[Screen](https://docs.thunkable.com/screen#when-screen1-backbuttonpressed)**
>
> When building apps on Thunkable, Screens function like blank pages in a book. They allow you to display different components and information.

---

<div class="post-metadata">

### Author: ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)
#### Post date: [November 16, 2019, 7:06pm UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/3 "2019-11-16T19:06:12Z")

</div>

@Conor just a question, would the “Back” gesture on iOS be the equivalent of this action? Since a few iOS versions, you can swipe from the left of the screen to the right and that works as the “Back” gesture. Just curious…

---

<div class="post-metadata">

### Author: ![danyklein](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@danyklein](https://community.thunkable.com/u/danyklein)
#### Post date: [November 16, 2019, 7:10pm UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/4 "2019-11-16T19:10:29Z")

</div>

no I tried…

---

<div class="post-metadata">

### Author: ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)
#### Post date: [November 17, 2019, 3:01am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/5 "2019-11-17T03:01:22Z")

</div>

Hi @Deluxe 👋

I think that’s caused by this -  
_(Gestures enabled)_

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/e/7ee75e88c85afb667072303b13fe680eafd9bc60.png)

If you have a iOS device, can you please test this?  
You just need 2 screens, 1st screen has a button which when clicked, navigates to screen2.  
we would test this thing -

> [@Deluxe](#):
>
> swipe from the left of the screen to the right and that works as the “Back” gesture.

Thanks! 😊

---

<div class="post-metadata">

### Author: ![danyklein](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@danyklein](https://community.thunkable.com/u/danyklein)
#### Post date: [November 18, 2019, 8:08am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/6 "2019-11-18T08:08:38Z")

</div>

Yes it works but let’s say you a list connected and you make changes on the second screen and you swipe right to go back the page will not show the changes I had to add a drawer nav to avoid that people go back like that

---

<div class="post-metadata">

### Author: ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)
#### Post date: [November 18, 2019, 8:24am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/7 "2019-11-18T08:24:42Z")

</div>

Then you should use no navigators - just use **navigate to** block when open a screen, and the same block in the **back pressed** event.

Example -

- Screen1 - has 1 button, when clicked, navigates to screen2.
- Screen2 - when back pressed, navigates back to screen1.

### Bug you’ll notice -

when you come back to screen1 from screen2, and press back on screen1 (there is no block added on screen1 for back press; it’s only on screen2) you will be navigated back to screen2.

### Fix -

Take a back pressed block on screen1, and take a label. make the label invisible, and add a block in back pressed block that is set label text to blank.

### Screen1 Blocks -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/f/8fe3be70454cd66a9368ed45581539d662c1c10c.png)

### Screen2 Blocks -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b1b102cbb17c759c4ef78b98d3a116b4b92c8d54.png)

This way, we make navigation easy with no navigators 👍 This can be prevented -

> [@danyklein](#):
>
> people go back like that

Hope I helped you 😊  
Thanks! 😊

---

<div class="post-metadata">

### Author: ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)
#### Post date: [November 21, 2019, 10:23am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/10 "2019-11-21T10:23:13Z")

</div>

And here is the big question: “Shouldn’t it?” 🙂

---

<div class="post-metadata">

### Author: ![danyklein](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@danyklein](https://community.thunkable.com/u/danyklein)
#### Post date: [November 21, 2019, 10:26am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/11 "2019-11-21T10:26:46Z")

</div>

I don’t understand your question ?

---

<div class="post-metadata">

### Author: ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)
#### Post date: [November 21, 2019, 10:31am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/12 "2019-11-21T10:31:40Z")

</div>

It was a rhetorical question. Shouldn’t swiping left to go back one screen count as “Back” in the same way tapping on the “Back” button counts as “Back” on Android?

It is also interesting to point out that the latest Android version supports swipe navigation so I assume that Thunkable should count swiping to go back both on Android and iOS as “Back”.

Just thinking out loud.

K.

---

<div class="post-metadata">

### Author: ![danyklein](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@danyklein](https://community.thunkable.com/u/danyklein)
#### Post date: [November 21, 2019, 10:36am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/13 "2019-11-21T10:36:12Z")

</div>

Ahh hahha yes it’s strange

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:42am UTC](https://community.thunkable.com/t/solved-what-is-this-block-backbuttonpressed/323147/14 "2024-11-08T11:42:58Z")

</div>


