Martin Jerome Raj
Martin Jerome Raj

Reputation: 13

How can I add onfocus() functionality in text field in sap ui5 instead of liveChange()

How can I add onfocus() functionality in text field in sap ui5 instead of liveChange(), we have tried using onfocusin(), it is not working, suggest some more functionalities.

Upvotes: 1

Views: 4798

Answers (1)

Qualiture
Qualiture

Reputation: 4920

Use the attachBrowserEvent method:

oYourTextControl.attachBrowserEvent("onfocus", function(oEvent) {
    // do whatever
});

https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.core.Control.html#attachBrowserEvent

Upvotes: 2

Related Questions