fix 'sticky' text boxes within sublayers
Fire up Illustrator 22.0 or 22.1 and create a new document.
Select the Text tool and draw a rectangular area. Fill it with placeholder text. Select the Rectangle tool and draw a filled rectangle (non-overlapping, though it doesn't matter).
Double click some word in the text box and start typing. Then in the Layers panel, click the 'select art' square corresponding to the filled rectangle. The rectangle becomes selected and the text box is deselected and all is good and well.
Deselect everything, hilight the rectangle and textbox objects in the Layers panel, and "Collect in New Layer". This puts the two objects into a new sublayer under the existing "Layer 1". Rotate the arrow-thing to uncollapse the new sublayer.
Now, repeat the above procedure: select the text box, select the text tool, double click on some word in the text and start typing. Then select the rectangle via the 'Selected Art' marker in the Layers panel.
The Layers panel shows the rectangle as selected and the text as deselected. The 'selection hilighting' (if 'Show Edges' is turned on) in the drawing area also shows the rectangle is selected and the text is deselected. Both of them are lying, however!
BUG: The text box is still (incorrectly) secretly selected. There's still a flashing text cursor right where it was. Pressing 'a' on the keyboard (unsurprisingly) puts in 'a' in the text box where the cursor is, rather than switching to the Direct Selection Tool.
Also, while in this confused state, click on the Selection Tool in the tools panel. The Layers panel updates to show that both the rectangle and the text box are selected, and both will have bounding boxes shown (assuming Show Edges is enabled) as well as a third bounding box that encompasses the two of them. All of that's fine and normal for both objects being selected, but the text box should have been deselected when the other object was selected via the Layers panel.
This only seems to happen when the text box is in a sub-layer. If it's in a top-level layer it correctly deselects when you select something else.
Needless to say, this is annoying as all get-out, and I routinely find myself inadvertently injecting arbitrary 'a' and 'v' characters into text that I've 'deselected'.
WORKAROUND: Hitting ESC or ctrl-shift-A (Deselect All) does correctly deselect the text box (whether it's in a sublayer or not). But I count on the Layers panel to make my object selections, and so this bug keeps biting me.
-
John Bradley commented
This same behavior is still there in 23.0.3. It would be nice if it were fixed.