react-component / react-component/notification

谷歌标签页休眠导致maxCount属性失效

Open
#305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
384
Forks
118
Avg merge
1h 18m
Merged PRs (30d)
2

Description

  • 配置maxCount为1;
  • 编写轮序每秒调用一次message;
  • 当前页面message执行正确,每次仅存在一个message;
  • 切换浏览器标签页面,等待5+秒;
  • 返回浏览器标签页面,message存在5+个。
    代码在路径/rc-notification/es/Notification.js line56
    如果是切换浏览器标签页面的话,我认为此时notices的值并不可靠。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at rc-notification/es/Notification.js line 56 and reproduce the issue with maxCount set to 1 and a message called every second. Switch away from the browser tab for more than five seconds, then return and inspect the notices. Done means maxCount remains effective after the tab resumes, with no more than one message present.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.