简体   繁体   English

如何在 SAP UI5/Fiori 中使用 Java 脚本打开其他应用程序或 web 选项卡时处理更改事件

[英]How to handle change event while opening other apps or web tabs with Java script in SAP UI5/Fiori

I have one change function in my sap.m.Input field.我的 sap.m.Input 字段中有一个更改 function。 If I added some value ex.1234 and selected tab or enter or I changed mouse to next input or mouse clicked some other where its showing some validation error.When its showing error I am deleting that value which is in Input.Its working fine for all conditions.如果我添加了一些值 ex.1234 并选择了选项卡或输入,或者我将鼠标更改为下一个输入或鼠标单击了其他显示验证错误的地方。当它显示错误时,我正在删除输入中的那个值。它工作正常所有条件。

Requirement: If user has added some value in the input and opened some outside applications like Outlook or he opened other web pages the error message is coming and the value from input also deleting.要求:如果用户在输入中添加了一些值并打开了一些外部应用程序,如 Outlook 或者他打开了其他 web 页面,则会出现错误消息并且输入的值也会被删除。 If user should open any other apps or any other web pages the function should not trigger.如果用户打开任何其他应用程序或任何其他 web 页面,则不应触发 function。

How to control it, Please help me.如何控制它,请帮助我。

Thanks in advance!!提前致谢!!

If user has added some value in the input and opened other apps like Outlook, excel or he opened any other browser tabs the function should not trigger如果用户在输入中添加了一些值并打开了其他应用程序,如 Outlook、excel 或者他打开了任何其他浏览器选项卡,则 function 不应触发

Unfortunately, it's not possible as the change event is always triggered the input loses focuses.不幸的是,这是不可能的,因为更改事件总是触发输入失去焦点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM