I received a request to tab to the next element when a user hits the enter key in a textarea.
Because of the element being a textarea, my solution was to call focusInNextTabElement()
I understand that focusInNextTabElement() should simulate a "tab" key, but it does not submit on the last tab element.
Example code below.
SmartClient version (available on lower left of Developer Console)
SmartClient Version: v10.0p_2015-12-02/Pro Deployment (built 2015-12-02)
Because of the element being a textarea, my solution was to call focusInNextTabElement()
I understand that focusInNextTabElement() should simulate a "tab" key, but it does not submit on the last tab element.
Example code below.
Code:
isc.DynamicForm.create({ fields: [ { name: "a", type: "textarea", keyPress: function (item, form, keyName, characterValue) { if (keyName === "Enter" && !EventHandler.shiftKeyDown()) { form.focusInNextTabElement(); return false; } return true; } }, { name: "b", type: "textarea", keyPress: function (item, form, keyName, characterValue) { if (keyName === "Enter" && !EventHandler.shiftKeyDown()) { form.focusInNextTabElement(); return false; } return true; } }, ] }); [B][/B]
SmartClient version (available on lower left of Developer Console)
SmartClient Version: v10.0p_2015-12-02/Pro Deployment (built 2015-12-02)
Comment