1

We are creating tabs in a tabset dynamically. We need to save a record when a tab loses focus. For some reason, the onblur event is not raised. onactive works fine, but we already lost the focus of the previous tab.

How can we raise an event before the current tab loses focus?

  • 1
    please make sure to include the relevant part of the code in your question. thanks – glls Jan 17 '19 at 17:26
0

From the description of the problem, and not knowing what your code actually looks like, I can only assume that you're doing something in that tab that you want to save. This means there are other actions you can (probably) listen for within that tab. If you've got a lightning:input taking some input, for example, try listening to the onblur event for that field instead.

If you don't have the ability to do that, you might have to fall back on some wrapper elements with one of these event listeners attached.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.