I have a home-made read-only editor that inherits ScrollView. It is very simple, just a tall div inside a scroll div. It scrolls fine with the scrollbar or mouse wheel.
I have a scrollToTop method overriding the ScrollView one and it doesn’t get called from a ctrl-home keypress. The binding resolver shows the
core:move-to-top event with a grayed-out x.
Since the resolver showed a context of
.workspace .editor I tried giving my view a class of
editor. This matches a normal source file sibling view (which does get the keypress). The resolver still shows the gray x. I also tried putting in an event handler in my activate method with no luck.
atom.workspaceView.command "core:move-to-top", => fileScroll.scrollToTop()
I suspect that somehow my view cant be a context for keypress events even though I can select it with a tab or simple click just like any other editor.
Is there any way to tell which views can be contexts for events and which can’t?