Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngMobile does not prevent ghost focus on form inputs after CSS transition #2810

Closed
@damrbaby

Description

@damrbaby

Webkit based browsers synthesize mouse events roughly 300ms after the touchend event, which can cause form fields to undesirably gain focus after a CSS3 transition.

This issue has been addressed by fastclick: ftlabs/fastclick#27

My workaround is to disable and re-enable text inputs and textareas on $viewContentLoaded (not pretty):

$rootScope.$on '$viewContentLoaded', ->
  $('input[type=text], textarea').attr('disabled', true)
  $timeout ->
    $('input[type=text], textarea').removeAttr('disabled')
  , 1000

I also added the following CSS so disabled text inputs look like regular ones on iOS::

input[type="text"]:disabled
  opacity: 1
  -webkit-text-fill-color: black

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions