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

web.skype.com - Unable to copy and paste the message in “Tell your friend what you are’re up to” section #41750

Closed
softvision-oana-arbuzov opened this issue Oct 7, 2019 · 2 comments
Labels
browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-important sci-exclude Bugs to exclude from out Top Site Compat Index metrics severity-minor The site has a cosmetic issue.
Milestone

Comments

@softvision-oana-arbuzov
Copy link
Member

softvision-oana-arbuzov commented Oct 7, 2019

URL: https://web.skype.com/

Browser / Version: Firefox Nightly 71.0a1 (2019-10-06) – Chrome UA
Operating System: Windows 10
Tested Another Browser: Yes

Problem type: Site is not usable
Description: Unable to copy and paste the message in “Tell your friend what you are’re up to” section

Prerequisites:
1. Set User Agent to Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3835.0 Safari/537.36
2. Signed in to Microsoft account.

Steps to Reproduce:
1. Navigate to https://web.skype.com/
2. After profile page is displayed click to edit “Tell your friends what you’re up to” field.
3. Type in a message (e.g “Going home”).
4. Select the typed message and using mouse right click button select “Copy”.
5. In the same field using mouse right click button, click “Paste”.
6. Observe behavior.

Expected Behavior:
The copied text is pasted.

Actual Behavior:
The copied text is not pasted. A previous copied text populates the field.

Note
1. Not reproducible on Chrome 77.0.3865.90
2. Screenshot attached.

CopyPasteBroken

Watchers:
@softvision-oana-arbuzov
@softvision-sergiulogigan
@cipriansv

sv;

Browser Configuration
  • None

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added this to the needstriage milestone Oct 7, 2019
@webcompat-bot webcompat-bot added browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-important labels Oct 7, 2019
@softvision-oana-arbuzov softvision-oana-arbuzov added the severity-minor The site has a cosmetic issue. label Oct 7, 2019
@softvision-oana-arbuzov softvision-oana-arbuzov changed the title web.skype.com - site is not usable web.skype.com - Unable to copy and paste the message in “Tell your friend what you are’re up to” section Oct 7, 2019
@karlcow karlcow added the sci-exclude Bugs to exclude from out Top Site Compat Index metrics label Oct 8, 2019
@karlcow
Copy link
Member

karlcow commented Oct 8, 2019

I'm on on macOS too.

fwiw. I do not have a mouse, but the contextual menu with Ctrl+click on web.skype.com is deactivated.
The same way command + C is deactivated. but command paste is working and replace the full text.

so I don't get the same exact behavior than @softvision-oana-arbuzov :)

Let me ask my partner in crimes @wisniewskit

@denschub
Copy link
Member

denschub commented Jul 2, 2020

So, unsurprisingly, they built their own clipboard handlers. The one causing trouble here is actually fairly simple, though:

document.addEventListener("copy", function (e) {
  if (e.clipboardData) {
    const t = document.getSelection();
    let i = t ? t.toString() : "";

    if (r.getPlatformType() === L.PlatformType.Windows) {
      i = i.replace(/\r\n?|\n/g, "\r\n");
    }

    if (i.length > 0) {
      e.clipboardData.setData("text/plain", i);
    }

    e.preventDefault();
  }
});

And there are a couple of interesting things here. The document.getSelection() returns the div around the input, not the input itself. And ultimately, the t.toString() returns an empty string in Firefox, but the selected input content in Chrome. This is nothing new, and in fact, the spec doesn't actually say what Selection.toString() is supposed to be doing here. The fact that this is not working on inputs for Firefox is noted on MDN, and is being tracked in bug 1527627.

As such, this breakage is somewhat expected. I'll close this bug as a duplicate of said Bugzilla issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-important sci-exclude Bugs to exclude from out Top Site Compat Index metrics severity-minor The site has a cosmetic issue.
Projects
None yet
Development

No branches or pull requests

5 participants