Using keyboard shortcuts to select type not performing as expected


Mac OS X version 10.12.1

I'm using Subform 0.0.0 8afa768 on Darwin 16.1.0 and am having trouble when trying to select type with keyboard shortcuts.

Steps to reproduce
• New block and add text field
• Using CMD + Shift + Right Arrow Key to try select all type to the right

• Error message (see image below or video)



Interesting. I saw this same error message in a different use case. Not sure to what degree these two bugs are related.


Thanks for this report and the video, @toby_burkill!

The issue is the hotkey is the same as Subform's hotkey for rearranging items (CMD + Shift + right arrow).
But in your case, there are no other siblings, so you are telling Subform to move the selected child (the text) "forward" in the child order, but it's the only child --- and it looks like I didn't account for that case when I wrote the code.

The problem exists regardless of the child --- I replicated it for a single box too.

I just implemented two fixes which will appear in the next release:

1) The hotkey will no longer throw an error when you are trying to rearrange an only child
2) Subform will ignore this hotkey when you are editing text, and will allow the behavior you expected (one-word-at-a-time expansion/contraction of the text selection bounds)



Hard to say. This error message is pretty low level. It basically means that I, the programmer, mistaken assured Subform that I told it how to handle all possible cases, but then when actually running Subform found a condition I hadn't told it about, and so it got angry.

In this topic, I neglected to handle the case where the "next child" and "previous child" were actually the same, because there was only one child.


haha I think Subform gets angry at me quite a bit :smile:


You're telling me = )