jsdialog: keep focus in drawingarea when typing

When drawingarea is used as edit filed it is updated
on every kep press or mouse click. We need to setup unique
id for img also so focus later will be set for the same element
after we get update message. (focus is set based on previously focused
id)

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I89021839177ab78fd0f2346cca2c58fac257af6b
This commit is contained in:
Szymon Kłos 2023-03-21 09:38:35 +01:00 committed by Pranam Lashkari
parent 707630a007
commit e6a70e21f4

View file

@ -27,6 +27,7 @@ function _drawingAreaControl (parentContainer, data, builder) {
return;
var image = L.DomUtil.create('img', builder.options.cssClass + ' ui-drawing-area', container);
image.id = data.id + '-img';
image.src = data.image.replace(/\\/g, '');
image.alt = data.text;
image.title = data.text;