Comment 76 for bug 107247

Revision history for this message
In , Neil-httl (neil-httl) wrote :

(In reply to comment #7)
> So, here is the problem. In platformHTMLBindings.xml, we define a VK_DOWN
> handler for caret navigation command so that you can go to the next line in
> editor by pressing down for example. If there is no editable element
> focused, we need the default behavior of scrolling the page down to take
> place, so we need some kind of a fallback event handler being bound to
> VK_DOWN. Is there any way to do that?
There is a way to do that, but you have to bind your handlers and attach your controllers to the focused element rather than the window root as you currently do.

The second approach is to fix the editor's command controller to work with editable regions.

The third approach is to stop editor from handling the up and down arrow keys. If you look at the global window controller you'll see that if it thinks there's a caret then it will try to do caret movement instead of scrolling. I think the test detects design mode but not contentEditable regions, so it still tries to do scrolling in that case.