# Bug OP-19112 - Popup for copying Calendar url disappears after 5 secs (too short)

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-19112

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Calendar |
| Target versions | 17.9.0 |
| Observed in versions | 17.2.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.2.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Mir Bhatia |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### 

Got it during a user training.

### Steps to reproduce

1.  Ensure your browser will prevent OpenProject from copying text to the clipboard
    
    1.  I was prevented from copying text to the clipboard but I don't know why, and was not anymore when I tried to reproduce this bug.
    
    2.  The only reliable way to reproduce this error is to open the brower DevTools, and then paste this code in the JS console:

<!-- end list -->

``` javascript
const orig = navigator.clipboard.writeText.bind(navigator.clipboard);
Object.defineProperty(navigator, 'clipboard', {
  value: { writeText: () => Promise.reject(new Error('Permission denied')) },
  configurable: true,
});
```

1.  Create a calendar

2.  Subscribe to the calendar ICS (More menu \> Subscribe to calendar)

3.  Type a name and then click "Copy URL" button

4.  An error is displayed saying "Your browser doesn't support copying to clipboard. Please copy it manually: <https://xxxx>" ...

### What is the buggy behavior?

  - The message disappears after 5 seconds. It's too short for reading + understanding + copying the URL.

  - The message is long gone before having been able to copy the URL

### What is the expected behavior?

1.  The popup should not disappear

2.  OR it could be the same as for the meetings subscription: it opens another modal in which the URL can be copied with a button or with a selection.

Additionnally, I'm not sure a "error" popup is justified. It looks like it did not work and the user did something wrong. Maybe just a "warning" popup could be enough.

### Screenshots and other files

See attached screen recording in the files tab.

**OpenProject version**

stage qa environment

17.2 / 17.3

**Browser**

- [x] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [ ] Windows
- [x] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
