objective-cmacosnstextfieldnscontrol

TAB in custom NSTextField does not put focus on another control


I have a custom NSTextField, where I'm implementing some rounded corners.

Pressing the "TAB" key does not go to the next NSTextField (or selectable control) in the window. Weird. Why would it do that? Is there something special I need to add to enable the app to go through the other controls when pressing "TAB"?


Solution

  • Seems like it was my fault.

    I was incorporating delegate calls within the custom class for textDidBeginEditing: and textDidEndEditing:, in order to maintain the placeholder text when the user tabs out of the field, but I wasn't calling the respective super class' methods as well.

    After including the call to [super textDidEndEditing...] and [super textDidBeginEditing...] tabbing works fine.