Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 912 Bytes

[Bug]-Input-lost-focus-after-typing-1-character-in-Safari-Browser.md

File metadata and controls

25 lines (17 loc) · 912 Bytes
  • Date : 2018-11-01
  • Tags : #css #safari #bug

[Bug] Input lost focus after typing 1 character in Safari Browser

Today my team met a weird bug on Safari browsers (on all Apple devices), that input losts its focus after you type first character.

First, we thought it's javascript bug so we wasted a lot of time for debugging the behaviour of input. But nothing works !

So we continued searching on Google, then we found this wonderful answer

The root issues caused by one CSS overrided -webkit-user-select to none, so we have to prevent it by add this line to end of CSS file

input, input:before, input:after {
	-webkit-user-select: initial !important;
	-khtml-user-select: initial !important;
	-moz-user-select: initial !important;
	-ms-user-select: initial !important;
	user-select: initial !important;
} 

Hope it helpful for you next time ! :D