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

notifications with custom placement are overlaping #5895

Closed
jakubkosinski opened this issue Apr 25, 2017 · 15 comments
Closed

notifications with custom placement are overlaping #5895

jakubkosinski opened this issue Apr 25, 2017 · 15 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@jakubkosinski
Copy link

Version

2.9.3

Environment

macOS, Chrome 58, Safari 10.1

Reproduction link

http://codepen.io/anon/pen/gWwJvw

Steps to reproduce

  1. Set custom placement for a notification
  2. Open a notification with custom placement
  3. Open another notification with the same custom placement

What is expected?

Notifications are not overlaping

What is actually happening?

Notifications are overlaping

@benjycui
Copy link
Contributor

ping @ystarlongzi

@benjycui benjycui added the 🐛 Bug Ant Design Team had proved that this is a bug. label Apr 25, 2017
@benjycui
Copy link
Contributor

@benjycui
Copy link
Contributor

@ystarlongzi it works fine with notification.confg, but it's broken with notification.open({ placement: ... })

@benjycui
Copy link
Contributor

Related: #5894

@ystarlongzi
Copy link
Contributor

ystarlongzi commented Apr 25, 2017

@benjycui Get, i'll fix it.

@tvrcgo
Copy link

tvrcgo commented Aug 9, 2017

@benjycui @ystarlongzi 关于这个问题还有一个场景:

  • A 组件调用 notification.success 不设置 placement,弹窗默认从右上角出
  • B 组件调用 notification.success 设置了 placement = bottomRight,弹窗从右下角出
  • A 组件再调用 notification.success 不设置 placement,弹窗变成从右下角出,默认 placement 被改了

只要某个地方设置了一次 custom placement,往后的所有 default placement 都会被改变。

这是正常的吗?


版本:antd@2.12.4

@djyde
Copy link
Contributor

djyde commented Aug 9, 2017

@benjycui Should defaultPlacement be immutable?

@benjycui
Copy link
Contributor

Please provide a re-producible demo: http://codepen.io/benjycui/pen/KgPZrE?editors=001

@tvrcgo
Copy link

tvrcgo commented Aug 10, 2017

@benjycui
Copy link
Contributor

@ystarlongzi why do you modify the defaultPlacement in here

@benjycui benjycui reopened this Aug 11, 2017
@afc163
Copy link
Member

afc163 commented Aug 16, 2017

@ystarlongzi

@djyde
Copy link
Contributor

djyde commented Aug 16, 2017

I am gonna to fix it. Should I?

@benjycui
Copy link
Contributor

@djyde yep, thanks.

@djyde
Copy link
Contributor

djyde commented Aug 17, 2017

But the notification.config(options) is conflict with immutable default placement.

@benjycui
Copy link
Contributor

@djyde I will handle this, there are several bugs in notification, not just the one which you had pointed it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

6 participants