From ae5fd0de0b8ff99f614465a327b5a8a8aa8c7902 Mon Sep 17 00:00:00 2001 From: BerndN Date: Thu, 8 Aug 2019 13:06:40 +0200 Subject: [PATCH 1/3] [Bug 22285] Prevent PI custom props taking focus from SE --- .../com.livecode.pi.customprops.behavior.livecodescript | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript b/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript index eb9a46534b..a117129b45 100644 --- a/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript +++ b/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript @@ -69,7 +69,12 @@ on editorUpdate if the result is empty then put tKey into field "value" of me put item -1 of tPath into field "key" of me - select the text of field "key" of me + + local tActiveField + put revRuggedID(the long id of the selectedfield) into tActiveField + if tActiveField contains not "revNewScriptEditor" then + select the text of field "key" of me + end if else put empty into field "key" of me put empty into field "value" of me From 927af201e6a1fce6d30a3e1eac2a80b01e7c3042 Mon Sep 17 00:00:00 2001 From: BerndN Date: Thu, 8 Aug 2019 13:10:24 +0200 Subject: [PATCH 2/3] Create bugfix-22285.md --- notes/bugfix-22285.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 notes/bugfix-22285.md diff --git a/notes/bugfix-22285.md b/notes/bugfix-22285.md new file mode 100644 index 0000000000..490ac1280d --- /dev/null +++ b/notes/bugfix-22285.md @@ -0,0 +1 @@ +# Prevent PI custom props taking focus from SE From 9a896df6a2ce50ca836159f4080b4bf84f0c221d Mon Sep 17 00:00:00 2001 From: BerndN Date: Thu, 15 Aug 2019 14:07:12 +0200 Subject: [PATCH 3/3] changed according to code from Panos --- .../com.livecode.pi.customprops.behavior.livecodescript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript b/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript index a117129b45..d70d2517d5 100644 --- a/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript +++ b/Toolset/palettes/inspector/editors/com.livecode.pi.customprops.behavior.livecodescript @@ -70,9 +70,10 @@ on editorUpdate put tKey into field "value" of me put item -1 of tPath into field "key" of me - local tActiveField - put revRuggedID(the long id of the selectedfield) into tActiveField - if tActiveField contains not "revNewScriptEditor" then + if the long name of the target contains "widget" && quote & "array" & quote \ + && "of group" && quote & "customProperties" & quote && "of group" && quote \ + & "Custom Properties" & quote && "of group" && quote & "inspector" & quote \ + then select the text of field "key" of me end if else