Giter Site home page Giter Site logo

colorpick's People

Contributors

greatbigsquirrel avatar qufighter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

colorpick's Issues

Possible to screenshot the wrong tab

Steps to reproduce:

  1. start ColorPick on one tab, (optionally: leave it in the mode where no color is yet selected). Leave the tab.
  2. resize the browser window... this will cause color pick to try to take a new snapshot.
  3. revisit the original ColorPick tab very quickly ( leave and immediately view a different tab )
  4. when you return to the ColorPick tab it will appear to have become the other tab you visited when in reality the screenshot is out of date.

This is caused by the nature of https://developer.chrome.com/extensions/tabs#method-captureVisibleTab where for a given window ID the visible tab might change at any time, making it difficult to know if the screenshot we got matches.

Possible solutions include:

  1. prior to and after capturing make sure the active tab didn't change.
  2. monitor all tab change events, and discard screenshots if tab any active changes had occurred

To avoid this issue, exit color picker before you change tabs.

Also, since it is possible to reproduce this issue when not "leave it in the mode where no color is yet selected" - we can probably avoid new snapshots in this mode, but it will not solve the issue completely.

There is an argument to be made that the API should provide a safer way to guarantee we are getting a snapshot of the tab we desire based on tabID.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.