TextBox onInput event not working

Hi

I am using the new onInput event handler and I can’t get it to work on TextBox. I have checked the documentation and it should work on TextBox: https://www.wix.com/corvid/reference/$w.TextBox.html#onInput

I can get it to work fine on Input fields, though the edit does say onInput does not exist as an event…

Heres my code both places in the $w.onReady:

$w(“#textBox1”).onInput( (event) => {
let newValue = event.target.value; // “newValue”
console.log(newValue)
} );

$w(“#input1”).onInput( (event) => {
let newValue = event.target.value; // “newValue”
console.log(newValue)
} );

When I enter somthing in #input1 the event is fired correctly, but hoting happens on #textBox1.

Does anyone know how to fix it or if it’s a known issue?

You will need to post your full $w.onReady() function so we can see what’s happening.

Also, please obvserve the community guidelines and post your code, nicely formatted, in a code block.

Hi Yisreal!

Thanks for the quick reply!

Here’s the full $w.onReady() function

$w.onReady(function () {
//TODO: write your page related code here...

    $w("#textBox1").onInput( (event) => {
        let newValue = event.target.value;  // "newValue"
        console.log(newValue)
    } );

    $w("#input1").onInput( (event) => {
        let newValue = event.target.value;  // "newValue"
        console.log(newValue)
    } );
} );

Hey Anders, thanks for providing the context. That’s what I thought you had, but wanted to be sure.

Don’t worry about the errors you have in the code panel. Even though there are errors the event handler works.

Not sure why the TextBox event handler isn’t triggering. Please post the URL of your site and I’ll take a look. Only authorized Wix personnel can get access to your site in the editor.

Hey Yisreal

Sure! Here’s the URL https://www.hestiacircle.org/online-final-grant-report
Please note that I have hidden the textbox and input field as my client is evaluating the site.
However, if you need to unhide them to test it out, please feel free to do so.

Thanks for your help!!

Hmm, seems like it’s not working. I’m sending this on to QA for evaluation. I’m also going to play with this some more.

Thank you @yisrael-wix ! Let me know if I can do anything.

@anders I was informed that this appears to be a bug. The fix should be released soon.

@yisrael-wix thanks for following up and handling it! I’ll be keeping my eyes on the bug fix page.