From 5e7c0880c15dc6855ec3de2884dd7d4512cf8e82 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 26 Feb 2025 22:29:31 +0100 Subject: [PATCH] UI - Browser Steps - "Click X,Y" should focus on the input field also --- changedetectionio/static/js/browser-steps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changedetectionio/static/js/browser-steps.js b/changedetectionio/static/js/browser-steps.js index 0b5f17d4..05237379 100644 --- a/changedetectionio/static/js/browser-steps.js +++ b/changedetectionio/static/js/browser-steps.js @@ -221,7 +221,7 @@ $(document).ready(function () { // If you switch to "Click X,y" after an element here is setup, it will give the last co-ords anyway //if (x['isClickable'] || x['tagName'].startsWith('h') || x['tagName'] === 'a' || x['tagName'] === 'button' || x['tagtype'] === 'submit' || x['tagtype'] === 'checkbox' || x['tagtype'] === 'radio' || x['tagtype'] === 'li') { $('select', first_available).val('Click element').change(); - $('input[type=text]', first_available).first().val(x['xpath']).focus();; + $('input[type=text]', first_available).first().val(x['xpath']).focus(); found_something = true; //} } @@ -305,7 +305,7 @@ $(document).ready(function () { if ($(this).val() === 'Click X,Y' && last_click_xy['x'] > 0 && $(elem_value).val().length === 0) { // @todo handle scale - $(elem_value).val(last_click_xy['x'] + ',' + last_click_xy['y']); + $(elem_value).val(last_click_xy['x'] + ',' + last_click_xy['y']).focus(); } }).change();