Skip to content

Commit

Permalink
update enter key press in text input
Browse files Browse the repository at this point in the history
  • Loading branch information
talp-525 committed Jan 27, 2023
1 parent 4d48eee commit 76314a3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ class InputTextCommonWidget extends Component {
* @param {{}} e
*/
handleEnter = e => {
if (!e.target.hasAttribute('data-enter')) return;
if (e.keyCode === 13) {
e.preventDefault();
const inputs = Array.from(document.querySelectorAll("input[data-enter='enabled'],select"));
const index = inputs.indexOf(e.target);
if (index === undefined) return;
if (!e.target.hasAttribute('data-enter')) return;

inputs[index + 1] && inputs[index + 1].focus();
const {
create_allowed,
Expand Down

0 comments on commit 76314a3

Please sign in to comment.