Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification stuck at the bottom if it pops up when the window is not visible. #69

Closed
don1989 opened this issue Jun 5, 2020 · 12 comments
Labels
bug Something isn't working

Comments

@don1989
Copy link

don1989 commented Jun 5, 2020

If you get a notification in your web app, and the tab of the app is not visible or active during the time it appeared... when you return into your app, the notification will appear stuck at the bottom of the screen.

Steps to reproduce:

  1. Paste the code below somewhere in your startup function.
  2. Start your app and ensure the page of your app is not visible, by either having the window minimised or on a different tab.
  3. When sufficient time has elapsed (15 seconds or so), maximise your app again.
  4. Notice that the notification that popped up is still present, however it's mostly cut off from view and wont disappear.
                 setTimeout( ()=>{
			store.addNotification({
				title: 'hello',
				message: 'there',
				type: "success",
				insert: "bottom",
				container: "bottom-right",
				animationIn: ["animated", "fadeIn"],
				animationOut: ["animated", "fadeOut"],
				dismiss: {
					duration: 5000,
					onScreen: true,
					showIcon: true
				}
			})
		}, 5000)

Notification Stuck

@stuckinaboot
Copy link

Was this ever fixed?

@don1989
Copy link
Author

don1989 commented Jul 15, 2020

Was this ever fixed?

Not yet

@stuckinaboot
Copy link

Was this ever fixed?

Not yet

Have you found a workaround? Or is there an alternative library you'd suggest? This library is so easy to use that I've been a bit hesitant to switch

@don1989
Copy link
Author

don1989 commented Aug 14, 2020

Was this ever fixed?

Not yet

Have you found a workaround? Or is there an alternative library you'd suggest? This library is so easy to use that I've been a bit hesitant to switch

I agree. I haven't found a workaround yet as it's low on our priority list atm.

@teodosii
Copy link
Owner

I'm looking to fix this, could you please post a gif for this to reproduce? Thank you!

@teodosii
Copy link
Owner

@stuckinaboot @don1989

@teodosii teodosii added the bug Something isn't working label Aug 18, 2020
@stuckinaboot
Copy link

@teodosii good to hear! I haven't been able to consistently reproduce but repeating the steps @don1989 listed a number of times should result in the issue occurring.

@don1989
Copy link
Author

don1989 commented Sep 4, 2020

It's not happening 100% so it's difficult to create a gif while reproducing the issue. But here is a gif of the actual issue happening.

AnimationIssue

@don1989
Copy link
Author

don1989 commented Oct 1, 2020

Not sure if it helps @teodosii

When this issue is happening - looking in the dev console at the "notification-parent" element, the height of the element is set to '0px', but it remains visible.

If I manually set the height to 0% in the console, it seems to make the issue disappear. Also if I set overflow to 'hidden', it also makes it disappear. (similar to some issues discussed here: https://stackoverflow.com/questions/950829/div-height0px-does-not-work).

This might just be some kind of refresh of the DOM that is making it go away, but maybe setting the height to 0px isn't enough when the transition is over?

@teodosii
Copy link
Owner

teodosii commented Oct 1, 2020

Hmm, are you sure you see only height: 0px? Should have overflox: hidden as well, otherwise the height: 0px doesn't work. I'll have a closer look on that, I'll be publishing the following days a new version and hopefully will have this fixed. From what I've seen, it doesn't position notifications properly when window is not visible, like there is a gap between them sometimes (in like 1 out of 3 tries)

@don1989
Copy link
Author

don1989 commented Oct 2, 2020

Here's a screenshot of the element if it helps.

Hieght0pxOnly

@teodosii
Copy link
Owner

Should be fixed in 3.0.0 as I wasn't able to reproduce it anymore. Feel free to reopen it if this is still happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants