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

[Bug] when removing saved clip - two clippings get removed instead of one #26

Closed
saifabusaleh opened this issue Oct 18, 2021 · 2 comments · Fixed by #27
Closed

[Bug] when removing saved clip - two clippings get removed instead of one #26

saifabusaleh opened this issue Oct 18, 2021 · 2 comments · Fixed by #27
Labels
bug Something isn't working Hacktoberfest help wanted Extra attention is needed up-for-grabs
Milestone

Comments

@saifabusaleh
Copy link
Owner

Scenario:

1- Copy few texts in order to have clipboard history clipping list

2- open the extension and try to remove few clippings (not the last ones)

Sometimes two clippings(lines) got removed instead of one

possibly related to this: #25

@panvicka
Copy link

Hi, I think I have found the bug.

It looks like the item removal is based only on timestamp. If two items have the very same timestamp (only seconds precision), they get both removed.

See the first image. Marked items fast6 + fast7 have the same timestamp and they get removed both if one of them is deleted (as shown on the second image). I observed the same behavior for the rest of the items with the same timestamp. Any items with different timestamps got always deleted correctly.

It is not easy to get 2 or more items with the same timestamp but it is possible...

Can you confirm this? What would be the best solution? Saving an extra ID for each item and maybe milliseconds as well (but then some additional time formatting would be probably needed). I would like to try to fix this, when we find a suitable solution.

PS: ignore the funky console.log, I have never tried debugging chrome extensions before :)

Capture_bug1

Capture_bug2

@saifabusaleh
Copy link
Owner Author

@panvicka hi, you are correct
this issue already have open PR with the fix, see here: #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Hacktoberfest help wanted Extra attention is needed up-for-grabs
Projects
None yet
2 participants