Focus event for mobile - javascript

Asked

Viewed 64 times

0

Can anyone tell me why the Focus event doesn’t work on mobile?

I found nowhere talking about it..

I have an input on the page that gets the focus normally.. on desktop is all working...

qnd enter via mobile.. on safari or Chrome.. the field does not receive the focus..

I used autofocus on the input itself, or via javascript elemtno via . Focus() both work on the desktop only..

thanks

  • Of course it works! Access this link on your mobile: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus

  • Try playing your problem in a fiddle or Stacksnippet.

  • Yes, but I needed to click the Go to input focus button.. in my case qnd the page is loaded the focus should already be in the field.. this does not happen..

  • Please provide a specific code for your problem.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.