CMD-Q doesn't quit the software when keyboard focus is in some Components?

I have a problem figuring out what might be blocking the CMD-Q key combination from quitting the software I’m writing (on Mac). This happens when keyboard focus is on some components, but it doesn’t happen on others. I’m not sure why this is so.

What could be blocking CMD-Q from working when focus is on some components?