You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by mike-jumper <gi...@git.apache.org> on 2017/09/04 01:01:19 UTC

[GitHub] incubator-guacamole-client pull request #186: GUACAMOLE-128: Fix clipboard b...

GitHub user mike-jumper opened a pull request:

    https://github.com/apache/incubator-guacamole-client/pull/186

    GUACAMOLE-128: Fix clipboard bounce.

    Under IE11, the clipboard integration code can use an unusual amount of CPU, to the point of crippling the browser. This is due to a number of factors:
    
    1. Copy/paste within content-editable `<div>` in IE11 is extremely slow (this is partly addressed by #185).
    2. Attempts to read/write the clipboard result in events which the Guacamole interface listens on to determine whether to re-read the clipboard, resulting in a never-ending read/write cycle, even though the clipboard is not actually changing.
    3. Depending on timing, clipboard read attempts may overlap. Since all read operations share the same event target, this may result in clipboard contents being duplicated (pasted multiple times within the event target prior to reading the event target contents).
    
    This change switches event handling order to ensure that read/write attempts will not themselves result in yet more attempts, and modifies `getLocalClipboard()` to consistently return the same promise while a read attempt is still in progress (thus avoiding overlap).


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mike-jumper/incubator-guacamole-client fix-clipboard-bounce

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-guacamole-client/pull/186.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #186
    
----
commit 1834e775c36242b936cfcd940fa83e5d648b9f5c
Author: Michael Jumper <mj...@apache.org>
Date:   2017-09-03T23:07:21Z

    GUACAMOLE-128: Do not allow overlapping clipboard read attempts.

commit a45c6e0fd682b0e06894d159004dd12bd7569f45
Author: Michael Jumper <mj...@apache.org>
Date:   2017-09-03T23:30:52Z

    GUACAMOLE-128: Stop propagation of "cut" events from within clipboard service event target.

commit f9b0f9b4ce8972392756004b4929240e6c0599ab
Author: Michael Jumper <mj...@apache.org>
Date:   2017-09-03T23:32:39Z

    GUACAMOLE-128: Check clipboard for received events only during bubble phase (allow clipboard service to manage propagation from its event target).

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-client pull request #186: GUACAMOLE-128: Fix clipboard b...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-guacamole-client/pull/186


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---