Skip to Content
Author's profile photo Yaron Ganor

Small workaround for TextArea change when inside an InPlaceEdit

Hi,

If you’ve been using InPlaceEdit with a TextArea you probably noticed that it has stopped responding to changes.

This is due to recent changes which are described here.

If you still want to leverage the benefits of TextArea combined with InPlaceEdit, a simple workaround can be used.

After defining a textArea control with a change function:

textArea.attachBrowserEvent(“blur”, textArea.onsapfocusleave);

textArea.onsapfocusleave = function(){

textArea.fireChange();

        };

Have fun.

byg.

Assigned tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Porselvan Muthavudaiyan
      Porselvan Muthavudaiyan

      Hi Yoran,

      Good that you have posted about this. Just what I was searching for.

      Where did you find the event onsapfocusleave. Is there a link where I can find these events associated with TextArea control or any other control.

      Regards,

      Porselvan

      Author's profile photo Yaron Ganor
      Yaron Ganor
      Blog Post Author

      Hi Porselvan,

      Thank you for the feedback.

      I am glad you found my advice useful.

      In general, you can find SAPUI5 documentation here:

      https://sapui5.netweaver.ondemand.com/sdk

      for this specific control and events you can find information on the specific api page:

      https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.commons.TextField.html#onsapfocusleave

      Hope this is helpful.

      byg.

      Author's profile photo Raghu M
      Raghu M

      Hi Yaron,

      I have the same problem coming up.....but I am afaraid your adviced solution is not working for me.

      However, live change event is working fine.

      I have a list in which I have binded the custom list item with data. So around 300 list items are getting created. Each list item has a inPlaceEdit  control with a textfield.

      Please help me with this.

      I am really stuck.

      Thanks a lot 🙂

      Regards,

      Raghu Murugesan

      Author's profile photo Yaron Ganor
      Yaron Ganor
      Blog Post Author

      Hi Raghu,

      I saw you got a reply here.

      Is the problem solved?

      byg