This one is kinda tricky. The ticket says the issue is with pasting into a new node. Here's what I did in my testing:
Copy a node
Open (zoom command) an existing node with no children
Hit Command + K (pick-command command)
The last step fails.
Reason:
Opening a node with no children shows a panel with a NewNode as the body. The NewNode doesn't exist in the workspace yet. The actual node isn't created until a character is entered (oninput). Pressing Command + K doesn't count as oninput, so when the pick-command action is run, it sees that there's no node in context, and as a backup, it tries to set the context to the current path head. After zoom though, the path head isn't on the screen any more, so it crashes since the input control it's expecting isn't on screen.
Proposal:
This PR just creates the node (runs insert-child) any time a key is pressed (onkeydown), not just when an actual character is entered (oninput). Now, as soon as the user tries to Command + K, the actual node will be created, then they can actually paste.
I'm not sure this is how you actually want things to work though, so let me know what you think @progrium @taramk
Fixes #275
This one is kinda tricky. The ticket says the issue is with pasting into a new node. Here's what I did in my testing:
zoom
command) an existing node with no childrenpick-command
command)The last step fails.
Reason:
Opening a node with no children shows a panel with a
NewNode
as the body. TheNewNode
doesn't exist in the workspace yet. The actual node isn't created until a character is entered (oninput
). Pressing Command + K doesn't count asoninput
, so when thepick-command
action is run, it sees that there's no node in context, and as a backup, it tries to set the context to the current path head. Afterzoom
though, the path head isn't on the screen any more, so it crashes since the input control it's expecting isn't on screen.Proposal:
This PR just creates the node (runs
insert-child
) any time a key is pressed (onkeydown), not just when an actual character is entered (oninput). Now, as soon as the user tries to Command + K, the actual node will be created, then they can actually paste.I'm not sure this is how you actually want things to work though, so let me know what you think @progrium @taramk