I cannot found the onfocusin() and onfocusout() events in the Input (BS5) control. In the help page of Input (Bootstrap 5), it show follows.
Standard events are supported. For this control, the onfocusin and onfocusout events will be useful. They are called when the user changes the focus to another field.
Even the sample code have this event.
*Function ipiInput1_onfocusout() *
End Function
When I run the code in browser, nothing happen.
Should I need to use back BS4?
It is so funny. I added a BS4 control (input or button or even label) in the form, then the onfocusout() event on Input (BS5) is working. When I deleted the this control, it won’t work again.
Not sure what’s going on here. We’ll fix the focus events right away and see if that resolves the issue.
Mixing BS4 and BS5 controls in the same app will definitely cause problems - don’t do that.
We’ve got a workaround for now - we’ll build this into AppStudio.
Right now, you probably have a function like this:
Input1.onfocusin = function () {
console.log("focus in");
};
The problem is that BS5 is not automatically registering this as an event, so you need to add an extra line:
Input1.onfocusin = function () {
console.log("focus in");
};
Input1.addEventListener("focusout", Input1.onfocusout);