Hi Tami, my guess is that these lines may need to be updated to account for changes to the HTML structure or CSS classes between the two Skuid releases you’re working with.
$(‘.nx-field > input’).first().focus();
$(‘.nx-field > input’).first().select();
Also, if this is meant to run right on page load, I would make sure you wait until after the page is rendered before running this, because otherwise the above page elements may not yet exist when the script is running. Any easy way to try this chagne would be to trigger the snippet using an event-triggered action sequence, where the triggering event is the Skuid: page rendered event. Here’s some info on that approach.
Mark,
Thanks for your response. Making the following updates fixed the issue.
Updating:
$(‘.nx-field > input’).first().focus();
$(‘.nx-field > input’).first().select();
To:
$(‘.nx-field input, .nx-field textarea, .nx-field .flex-text-wrap pre, .nx-field .nx-richtext-input’).first().focus();
$(‘.nx-field input, .nx-field textarea, .nx-field .flex-text-wrap pre, .nx-field .nx-richtext-input’).first().select();
FYI: The snippet is not meant to be called on page load, it is called from within another snippet.
Thanks for your help!
Glad to hear this! And thank you for closing the loop on this conversation.