Created
April 22, 2022 12:27
-
-
Save bjoerntx/c64bec09aca02996dde36c98379b81f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function attachClickEvent(field) { | |
// remove active listeners | |
TXTextControl.removeEventListener("textFieldClicked", selectField); | |
// handle only editable form text fields | |
if (field.textField.type === "TEXTFORMFIELD" && field.textField.editable === true) { | |
// store current field for later comparison | |
_currentField = field; | |
// set the input value | |
document.querySelector("#cmFieldName").value = field.textField.name; | |
drawContextMenu(); | |
TXTextControl.addEventListener("textFieldClicked", selectField); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment