quill icon indicating copy to clipboard operation
quill copied to clipboard

focus function problem on ipad

Open leo-zhao opened this issue 12 years ago • 4 comments

I used focus() fuction from API, eg editor.focus(); then ipad key board can popup as default.The text editor get focused, but the problem is the editor is frozen, you can't type in anything to the text editor. I checked from safari developer tool, there is no error from the console.

leo-zhao avatar Sep 01 '14 02:09 leo-zhao

This sounds like a problem that occurs when an iframe's contentWindow has lost focus, but its body still has focus (see https://github.com/xing/wysihtml5/issues/98#issuecomment-35707207). This is probably solved by the latest release, due to ceasing to use iframes.

masonicboom avatar Apr 09 '15 00:04 masonicboom

@jhchen this is probably fixed (see my previous comment). How about closing to not scare anyone off? If still an issue @leo-zhao can re-open.

masonicboom avatar Apr 10 '15 02:04 masonicboom

I wanted to verify if this was an issue or not. It seems the current state is you cannot programmatically trigger focus at all on a non-input element on mobile Safari. There may be a workaround but this seems to be a deliberate security feature from Apple.

jhchen avatar Apr 11 '15 00:04 jhchen

As long as you are calling focus() from a user initiated action, things appear to work as expected.

jhchen avatar May 12 '16 06:05 jhchen