SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.92k stars 1.23k forks source link

oFocusInfo lacks documentation #4010

Closed jvanattedev closed 4 months ago

jvanattedev commented 4 months ago

OpenUI5 version: any

Browser/version (+device/version): n.a.

Any other tested browsers/devices(OK/FAIL): n.a.

URL (minimal example if possible): https://sapui5.hana.ondemand.com/#/api/sap.ui.core.Element%23methods/focus

User/password (if required and possible - do not post any confidential information here):

The focus function lacks documentation. It mensions oFocusInfo as an argument. This contains 'targetInfo' with type 'any' (?). What information or type are we supposed to provide to this function, to all these arguments?

This oFocusInfo contains different information compare to the one in, looking at the signature of the method: https://sapui5.hana.ondemand.com/#/api/sap.ui.core.Element%23methods/applyFocusInfo

Is that a correct assumption?

TeodorTaushanov commented 4 months ago

Hello @jvanattedev,

Thank you for sharing this finding. I've created an internal incident DINC0098637. The status of the issue will be updated here in GitHub.

Regards, Teodor

aborjinik commented 4 months ago

Hello @jvanattedev Element#focus as a base class method defines the focus possibilities and as documented it defines "Further control-specific setting of the focus target within the control". So if want to know that its type should be or whether it should be provided or not must be documented by the controls. e.g. sap.m.Table defines the targetInfo as "If oFocusInfo.targetInfo is of type sap.ui.core.message.Message, the focus will be set as accurately as possible according to the information provided by sap.ui.core.message.Message." https://sapui5.hana.ondemand.com/#/api/sap.m.Table%23methods/focus

I guess we cannot define this better.