# Some bug when entering a certain page with Auto Focus on a text edit

**URL:** <https://community.appfarm.io/t/some-bug-when-entering-a-certain-page-with-auto-focus-on-a-text-edit/285>\
**Category:** Ask the community\
**Tags:** ui, service\
**Created:** [February 21, 2023, 2:39pm UTC](https://community.appfarm.io/t/some-bug-when-entering-a-certain-page-with-auto-focus-on-a-text-edit/285 "2023-02-21T14:39:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fridtjof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/fridtjof/32/262_2.png) [@Fridtjof](https://community.appfarm.io/u/Fridtjof)\
**Post date:** [February 21, 2023, 2:39pm UTC](https://community.appfarm.io/t/some-bug-when-entering-a-certain-page-with-auto-focus-on-a-text-edit/285/1 "2023-02-21T14:39:39Z")

</div>

When entering a page - I get this error and its seems to be some kind of internal appfarm bug.

It came after I set a text input to “auto focus”. When removing it - the problem goes away

![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/1dd4ef9cce2e039622cc8ec988528326bb1a23ac.png)

Best regards,  
Fridtjof

---

<div class="post-metadata">

**Author:** ![Joanna](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/joanna/32/122_2.png) [@Joanna](https://community.appfarm.io/u/Joanna)\
**Post date:** [February 22, 2023, 8:39am UTC](https://community.appfarm.io/t/some-bug-when-entering-a-certain-page-with-auto-focus-on-a-text-edit/285/2 "2023-02-22T08:39:33Z")

</div>

Hi Fridtjof,  
To debug this, I would start by finding the place in your app where `pulsate` is being read (this is likely used in a function, action, or service related to this field) – seems like there’s a null check missing.  
Are there any actions triggered `On Focus` or `On Enter` on the field you’re autofocusing?

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [February 22, 2023, 9:45am UTC](https://community.appfarm.io/t/some-bug-when-entering-a-certain-page-with-auto-focus-on-a-text-edit/285/3 "2023-02-22T09:45:06Z")

</div>

Hi! We do have a registered bug (crash, with same message) when having an element with autofocus inside a container with “On Click” event! Could this be the case @Fridtjof ?

It should of course not crash (but autofocus inside a clickable container does not sound right either).

---

<div class="post-metadata">

**Author:** ![Fridtjof](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/fridtjof/32/262_2.png) [@Fridtjof](https://community.appfarm.io/u/Fridtjof)\
**Post date:** [February 22, 2023, 9:57am UTC](https://community.appfarm.io/t/some-bug-when-entering-a-certain-page-with-auto-focus-on-a-text-edit/285/4 "2023-02-22T09:57:57Z")

</div>

That is correct.

Yes, I was just testing different things to see how it would work, agree its a wierd solution 🙂
