I have scratching my head for a week to find root cause of this problem:
I have some input fields (<input type="text">)
; in IE I have to click two times in it to write and in Mozilla it works fine. If there is already text in it, it takes three clicks to write text in it and same problem is in Mozilla. Even after this, I can't move cursor or select text by mouse. TAB
key works fine and cursor can be moved by arrow keys. Same problem exists for textarea
.
In chrome, it works fine. Some more information:
- The whole HTML is in iFrame
- the problem is not in focusing. On single click, it gets focused but on double click only, cursor is shown in the input fields
- I can't modify or access any element outside iFrame. I can modify only the code inside iFrame
- The code is so big that I can't paste it here
- Problem exists for all
<input type="text">
fields. I am using oi-select library. For those fields it is working fine.
Before you declare it as duplicate, here are the things I have tried:
- I removed all CSS from the element and reset inherited CSS so it is not a issue of CSS
- I am not overriding any mousedown function
- I tried to focus on an element inside iFrame through jQuery but still problem is there.
- I wrote time consuming tasks as mentioned in the some answer, still no change in the behaviour.
- I called ng-focus, ng-mousedown in those elements to test, the functions in these events are being fired properly.