openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

MessageToast setting "autoClose: false" has no effect

Open PabloMizzle opened this issue 6 years ago • 3 comments

https://github.com/SAP/openui5/blob/b9efbc56a2e9709ea23f141e7c923c5979f62b29/src/sap.m/src/sap/m/MessageToast.js#L328

Not sure if this is the right place but somewhere should be a check if autoClose is enabled, otherwise the popup should stay open...

PabloMizzle avatar Apr 07 '20 10:04 PabloMizzle

Hi @PabloMizzle,

Do you mean that the code fails to check the value of "autoClose"?

The check exists, but is outside the scope of the sited MessageToast._setCloseAnimation function.

Currently I do not see a deviation from the documented behavior. Please give us more details if you see an issue.

Thanks, Diana

kineticjs avatar Apr 08 '20 10:04 kineticjs

Hi Diana,

Please have a look at this example.

As far as I understand "autoClose", setting it to "false" should keep the MessageToast open until the user clicks somewhere...

Best, Pablo

PabloMizzle avatar Apr 08 '20 10:04 PabloMizzle

Hi Pablo,

Thank you for the isolated sample.

The "autoClose" property determines if the MessageToast can be closed before its "duration" times out. That is, the "duration" value ensures that the MessageToast is eventually closed, even if "autoClose" is "false". There is a default "duration" of 3000 (apiRef: https://openui5nightly.hana.ondemand.com/api/sap.m.MessageToast#methods)

I understand that you intuitively expected a different behavior, given the name of the "autoClose" property. We also recommend the Fiori Guidelines https://experience.sap.com/fiori-design-web/message-toast/ as reference on the desired behavior using MessageToast and the other controls,

Thanks, Diana

kineticjs avatar Apr 08 '20 16:04 kineticjs