[wp-trac] [WordPress Trac] #31162: Prevent device keyboard from displaying after selecting an image in TinyMCE

WordPress Trac noreply at wordpress.org
Sat Jan 31 18:42:45 UTC 2015


#31162: Prevent device keyboard from displaying after selecting an image in TinyMCE
-------------------------+------------------------------
 Reporter:  siobhan      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  TinyMCE      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  make-flow    |     Focuses:  javascript
-------------------------+------------------------------

Comment (by azaozz):

 As @iseulde mentions above, there is no way to prevent opening the
 onscreen keyboard. There is a long-winded hack for closing it:
 - Guess when the keyboard is open.
 - Move focus to a '''visible''' text field somewhere else on the page. It
 has to be visible (as opposed to `display: none` or `visibility: hidden`)
 to receive focus and ideally it has to be whiting the boundaries of the
 current viewport so the browser doesn't scroll.
 - Blur the text field. At this point focus is set to the body and the
 keyboard should close.
 - Setting the focus directly to the body or a "non-typable" element
 doesn't work.

 We could try this hack but... It is a hack, not sure if/when it will
 break. BTW iOS Safari doesn't even select images inside contenteditable.
 It ignores the clicks. We have to select them "by hand".

 Perhaps one day there will be more control of the onscreen keyboard in
 mobile browsers. Not holding my breath though.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31162#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list