ChromeExtension-GoogleDocsUtil icon indicating copy to clipboard operation
ChromeExtension-GoogleDocsUtil copied to clipboard

The "selectedText" returns incorrect value when document is open in multiple sessions (e.g. collaborative mode)

Open volpav opened this issue 5 years ago • 3 comments

Noticed this when playing around with the tool.

Steps to reproduce:

  1. Open a document in a new browser tab and select a piece of text;
  2. Observe googleDocsUtil.getGoogleDocument().selectedText returning the correct selection;
  3. Open the same document in a different browser tab (keep the current tab open), navigate to it;
  4. Select another piece of text which appears after the one which is already selected in a first tab;
  5. Observe googleDocsUtil.getGoogleDocument().selectedText still returning the text selected in a first tab, even when the code is executed in a second tab;

By looking at the DOM, there doesn't seem to be a great way to distinguish between the two selections (i.e. to determine which one is from the current session).

volpav avatar Jan 08 '20 21:01 volpav