The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Input :active Pseudo-Class Not Working In iOS Safari, Chrome, Etc.

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #235645

    I’ve been working on a pen ( that is just an input field. When active, the label moves out of the way to let you type your name. This works well on a desktop/laptop environment, but when viewed on iOS (and maybe Android too, I don’t know) it doesn’t work properly. Safari, Chrome, Opera Mini, and most other browsers don’t activate the :active pseudo-class, and thus the label stays in the way.
    Is there any way around this? Some suggest adding a bit of JavaScript code like this to your page document.addEventListener("touchstart", function() {},false); , but so far this hasn’t worked for me. The only mobile browsers (that I tested) that it seems to work on, is: Firefox, 1Password, and Puffin.

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.