feat: maintain input type for fields
This commit is contained in:
@@ -1168,12 +1168,18 @@ export class WorkflowGenerator {
|
|||||||
const [selector, encryptedKey, type] = condition.args;
|
const [selector, encryptedKey, type] = condition.args;
|
||||||
const key = decrypt(encryptedKey);
|
const key = decrypt(encryptedKey);
|
||||||
|
|
||||||
let state = inputStates.get(selector) || {
|
let state = inputStates.get(selector);
|
||||||
selector,
|
if (!state) {
|
||||||
value: '',
|
state = {
|
||||||
type: type || 'text',
|
selector,
|
||||||
cursorPosition: -1
|
value: '',
|
||||||
};
|
type: type || 'text', // Use the type from the press action
|
||||||
|
cursorPosition: -1
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// Update type from the press action if it exists
|
||||||
|
state.type = type || state.type;
|
||||||
|
}
|
||||||
|
|
||||||
if (key.length === 1) {
|
if (key.length === 1) {
|
||||||
if (state.cursorPosition === -1) {
|
if (state.cursorPosition === -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user