# Quick Question -- Is there a way to set a condition on focus?

**URL:** <https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963>\
**Category:** Need help\
**Created:** [November 17, 2016, 5:24pm UTC](https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963 "2016-11-17T17:24:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sridharan.s](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sridharan.s/32/17881_2.png) [@sridharan.s](https://forum.bubble.io/u/sridharan.s)\
**Post date:** [November 17, 2016, 5:24pm UTC](https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963/1 "2016-11-17T17:24:31Z")

</div>

Anyone know a way to set a condition on focus? I could use a text element, group, shape, etc.

**Details:** I’m showing an “x” after an input field and want the user to know that clicking the x will close/delete that row. Would like to update the look of the x when the user sets the focus on it by tabbing through the form since it’s a UX best practice to make clickable elements appear clickable.

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [November 17, 2016, 5:50pm UTC](https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963/2 "2016-11-17T17:50:06Z")

</div>

Like this?

> **[Bubble Editor - Forumapp3](https://bubble.io/page?type=page&name=input_focus&id=forumapp3&tab=tabs-1)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

  

> **[Bubble - Visual Programming](https://forumapp3.bubbleapps.io/version-test/input_focus?debug_mode=true)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

---

<div class="post-metadata">

**Author:** ![sridharan.s](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sridharan.s/32/17881_2.png) [@sridharan.s](https://forum.bubble.io/u/sridharan.s)\
**Post date:** [November 17, 2016, 5:55pm UTC](https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963/3 "2016-11-17T17:55:39Z")

</div>

Similar but different.

I have workflows attached to the “x” so when a user clicks tab it’ll take them to the x after the input (just how Bubble works). As such, I’m looking to have the “x” change color when it’s in focus so that user’s know where the focus went and so they know the x is clickable.

If I can’t get it to work the way I envision, then I may just put the x’s in a separate RG (so user’s clicking tab won’t focus them) and have them conditionally set the way you’re doing it. Seems quite effective.

Thanks Gaby

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [November 17, 2016, 6:04pm UTC](https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963/4 "2016-11-17T18:04:26Z")

</div>

Ah, when the X is focused… Ok, I changed it. I put another input behind the X so that you’re actually tabbing to that input. I added style conditions on the “hidden” input & the x when the hidden input is focused (of course, the input doesn’t really need a styling, it can just be the x). Made sure to give the X a background so it covers the blinking focus indicator since that’s not actually an input we want to use. Also made sure to cover the input’s width so that it’s not ever type-able.

That work?

---

<div class="post-metadata">

**Author:** ![sridharan.s](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sridharan.s/32/17881_2.png) [@sridharan.s](https://forum.bubble.io/u/sridharan.s)\
**Post date:** [November 17, 2016, 6:07pm UTC](https://forum.bubble.io/t/quick-question-is-there-a-way-to-set-a-condition-on-focus/7963/5 "2016-11-17T18:07:17Z")

</div>

Yes!

Creative solution. I like it. Thanks!
