Skip to content

Fix: deselect way when selecting first/last node#12135

Open
kamalzada37 wants to merge 1 commit intoopenstreetmap:developfrom
kamalzada37:fix-select-node-deselect-way
Open

Fix: deselect way when selecting first/last node#12135
kamalzada37 wants to merge 1 commit intoopenstreetmap:developfrom
kamalzada37:fix-select-node-deselect-way

Conversation

@kamalzada37
Copy link
Copy Markdown

Fixes issue #10962

When selecting the first or last node of a way using keyboard shortcuts, the way remained visually selected, which caused confusion.

This change ensures that only the selected node remains active, and the parent way is properly deselected.

The fix replaces reuse of the existing mode with a fresh select mode, preventing stale selection state.

Tested locally:

  • Selected a way
  • Used first/last node shortcuts
  • Confirmed that only the node is selected and the way is no longer highlighted

@kamalzada37

This comment has been minimized.

@matkoniecz
Copy link
Copy Markdown
Contributor

build / build (22) (pull_request)Failing after 1m


/home/runner/work/iD/iD/modules/modes/select.js
  495:15  error  'graph' declared on line 315 column 17 is used outside of binding context  block-scoped-var
  495:31  error  '_selectedData' is not defined                                             no-undef
  506:15  error  'graph' declared on line 315 column 17 is used outside of binding context  block-scoped-var
  506:31  error  '_selectedData' is not defined                                             no-undef

✖ 4 problems (4 errors, 0 warnings)

ERROR: "lint" exited with 1.
Error: Process completed with exit code 1.

@matkoniecz
Copy link
Copy Markdown
Contributor

@kamalzada37 Do you plan to finish it?

@kamalzada37
Copy link
Copy Markdown
Author

kamalzada37 commented Apr 15, 2026 via email

@matkoniecz
Copy link
Copy Markdown
Contributor

@kamalzada37 do you plan to finish it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants