Skip to content

When copy all contents of a file to another, the two files become linked #1887

Closed
@JetStarBlues

Description

@JetStarBlues

Nature of issue?

  • Found a bug

Details about the bug:

  • Web browser and version: Chrome 91.0.4472.77 (64-bit)
    • I was not able to reproduce this behaviour on Firefox 89.0 (64-bit)
  • Operating System: Windows 10

Steps to reproduce this bug:

  • Step 1
    • create a new file (thecopy.js)
  • Step 2
    • copy all of the contents of sketch.js to this new file using:
      • ctrl-a, ctrl-c, ctrl-v
  • Step 3
    • edit the original file (sketch.js)
    • The bug:
      • changes made in the original file are reflected in the new file (thecopy.js)
        • the files have become linked somehow
      • a simple refresh doesn't seem to clear this link
        • sort of (this is tricky to track down, sometimes a couple of refreshes does clear)
        • a "hard reload" seems to clear the link

Maybe somewhere along the line, instead of a true copy (deep), the file contents are just copied by reference (shallow).

I've encountered this bug a couple of times, when attempting to "save" existing work and create a new copy where I'm free to delete/change etc. Or when wanting to use one file as a template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:HighShould be addressed soon but not critical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions