From e6a70e21f47dad382d12b4edb19ccd97deff8a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Tue, 21 Mar 2023 09:38:35 +0100 Subject: [PATCH] jsdialog: keep focus in drawingarea when typing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I89021839177ab78fd0f2346cca2c58fac257af6b --- browser/src/control/jsdialog/Widget.DrawingArea.js | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/src/control/jsdialog/Widget.DrawingArea.js b/browser/src/control/jsdialog/Widget.DrawingArea.js index 22737a166..e1085635e 100644 --- a/browser/src/control/jsdialog/Widget.DrawingArea.js +++ b/browser/src/control/jsdialog/Widget.DrawingArea.js @@ -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;