4
4
4eloBek2015-08-13 21:14:04
JavaScript
4eloBek, 2015-08-13 21:14:04

How to keep selection when working with execCommand (clicking pictures, not text links)?

There was a problem with "holding" the selection when clicking not on a text link (like <a></a>. everything is fine with it), but on an image?

Here is an example at http://jsfiddle.net/
PS In this example, the link is not placed when clicking on the icon. onmousedownallows you to put it down, but removes the selection (

Tell me how to fix this trouble?
Thanks in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-08-15
@4eloBek

It is not entirely clear what exactly you need, but, for example, in order for the focus to work on a div, it must have the attribute tabindex="-1"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question