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

Selecting sketch tab via menu results in duplicate tabs #793

Closed
per1234 opened this issue Feb 1, 2022 · 1 comment · Fixed by #1012 or #1024
Closed

Selecting sketch tab via menu results in duplicate tabs #793

per1234 opened this issue Feb 1, 2022 · 1 comment · Fixed by #1012 or #1024
Assignees
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 1, 2022

Describe the bug

The button on the right side of the editor bar lists all the editor tabs of the sketch. The user can select the tab from this menu, which can be useful for navigating sketches with many tabs.

🐛 If a sketch tab which has not previously been opened via the standard tab UI is opened from this menu, a duplicate tab is opened.

To Reproduce

  1. Select File > New from the Arduino IDE menus.
  2. Click the button on the right side of the editor bar.
  3. Select "New Tab" from the tab control menu.
  4. In the "Name for new file" field, type TabB.
  5. Click the OK button.
  6. Save the sketch as "TabA".
  7. Close the IDE window that has "TabA" open.
    (this is necessary because the bug only occurs when a tab has not yet been opened in the current window, and at this point both the tabs have been opened)
  8. Open the "TabA" sketch in the Arduino IDE.
  9. Click the button on the right side of the editor bar.
  10. From the menu, select whichever of the two tabs is not currently open in the editor.

🐛 You now have two duplicate tabs for the file that was selected from the menu:

image

(in this screenshot, I selected "TabA.ino" from the menu)

Expected behavior

Each sketch file only ever gets a single tab in the editor.

Desktop

Original report

  • OS: Windows 10
  • Version: 2.0.0-rc3-snapshot.759b410
    Date: 2022-01-31T13:15:29.574Z
    CLI Version: 0.20.2 [13783819]

Last checked with

  • OS: Windows 10
  • Version: 2.0.0-rc3-snapshot-2f9bf86
    Date: 2022-02-11T14:52:06.341Z
    CLI Version: 0.21.0 [10107d24]

Additional context

This is most likely another incarnation of the same bug that causes #656. I decided to open a separate issue for it since this one is encountered via a significantly different and more common UI path than #656 and there have been multiple user reports of this general issue.

The duplicate tabs contain the file parent path as reported at #665


The issue is not dependent on the specific sketch creation method from the instructions. It will occur with any multi-tab sketch.

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 1, 2022
@ubidefeo ubidefeo added the criticality: high Of high impact label Feb 16, 2022
@ubidefeo ubidefeo added this to the arduino-ide rc5 milestone Feb 17, 2022
@fstasi fstasi modified the milestones: arduino-ide rc5, arduino-ide rc6 Mar 24, 2022
@fstasi fstasi assigned msujew and unassigned AlbyIanna Apr 1, 2022
@fstasi fstasi closed this as completed May 9, 2022
@per1234
Copy link
Contributor Author

per1234 commented May 9, 2022

Still not fixed so the issue must remain open:

dup-tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
5 participants