1

I have a page intended for desktop and mobile that has buttons allowing the user to touch and hold them to make adjustments. This jsfiddle illustrates the behaviour.

The problem is that on my Android phone, the div acting as a button gets highlighted with focus. It will then no longer respond to touch events until the focus has been taken away from it (by pressing another button) and going back to it.

Is is possible to clear or disable the focus of elements?

izb
  • 50,101
  • 39
  • 117
  • 168

2 Answers2

1

Would e.preventDefault be an option?

Lowkase
  • 5,631
  • 2
  • 30
  • 48
0

you can try $("#id").blur(), or simply focus on something else like $("#otherid").focus()

Gavriel
  • 18,880
  • 12
  • 68
  • 105