Hi,
Sure! You will need a tiny bit of custom javascript code for that:
document.addEventListener("DOMContentLoaded", () => {
document.querySelectorAll('input.orig').forEach(function(el){
el.addEventListener('keydown', function(e) {
console.log(e.key);
if ( e.key === 'Tab' ) {
e.preventDefault();
const ev = new Event("keyup");
ev.which = 39;
el.dispatchEvent(ev);
}
})
});
});
Try adding this code via the Code Snippets plugin.
If you want to use the functions.php file in your theme/child theme directory, then use this variation:
add_action(
'wp_footer',
function () {
?>
<script>
document.addEventListener("DOMContentLoaded", () => {
document.querySelectorAll('input.orig').forEach(function(el){
el.addEventListener('keydown', function(e) {
console.log(e.key);
if ( e.key === 'Tab' ) {
e.preventDefault();
const ev = new Event("keyup");
ev.which = 39;
el.dispatchEvent(ev);
}
})
});
});
</script>
<?php
}
);
For more details you can check the safe coding guidelines.