From 288abf320cc63bf516374609562441d5766718bf Mon Sep 17 00:00:00 2001 From: lacatoire Date: Tue, 10 Feb 2026 17:24:06 +0100 Subject: [PATCH] Fix Add Link OK button not working in device notes editor When no text was selected before clicking Add Link in the jQuery TE editor, the selected2link function's else branch did not call replaceSelection to mark an element with the setdatalink attribute. This caused linkRecord (triggered by the OK button) to find no marked elements and silently do nothing. Now replaceSelection is called in all cases so the link can be inserted even without a prior selection. Fixes #1431 --- scripts/jquery-te-1.4.0.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/jquery-te-1.4.0.js b/scripts/jquery-te-1.4.0.js index 43fde0e07..d90d400b0 100644 --- a/scripts/jquery-te-1.4.0.js +++ b/scripts/jquery-te-1.4.0.js @@ -582,6 +582,7 @@ replaceSelection("a",setdatalink,""); } }else{ + replaceSelection("a",setdatalink,""); linkinput.val(thisHrefLink).focus(); }