salesforce-ux / design-system

Salesforce Lightning Design System
https://www.lightningdesignsystem.com
Other
3.57k stars 827 forks source link

Notifications/Toast Messages in Salesforce1 app. #39

Closed chriswoolcott closed 9 years ago

chriswoolcott commented 9 years ago

Hi There

I have used Toast Messages for various notifications in my app (VF page with JS remoting using SLDS), this all works fine in the browser, but in the Salesforce1 app the alerts appear at the top of the document regardless of where on the page the user is currently scrolled.

I assume this is due to the way the pages are framed in, as I've had problems with this in SF1 app before, just wondering if their are any suggested workarounds?

Cheers Chris

srohde commented 9 years ago

Can you please add a screenshot to clarify?

chriswoolcott commented 9 years ago

img_0142

Scrolled slightly in the page and this has resulted in the message being clipped. Scrolling any further and the message isn't visible, as remains at the top of the document.

sdruckerfig commented 9 years ago

Try throwing a force:showToast event in S1 instead of using SLDS.

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one.htm

stefsullrew commented 9 years ago

@chriswoolcott - Does @sdruckerfig's fix work for you? Or do you have further questions for us?

chriswoolcott commented 9 years ago

Thank you @sdruckerfig, I got pulled on to another project so haven't had a chance to review yet, but certainly looks like this will do the trick.

stefsullrew commented 9 years ago

I'm going to close this for now. Let us know if you come into problems. Cheers.