RichTextEditor: suppress the output of the "Enter" key

Hi,

How ca I suppress the output of the “Enter” key on this editor?

This code doesn’t work:

        richTextEditor.addKeyDownHandler(new KeyDownHandler() {
            public void onKeyDown(KeyDownEvent event) {
                if (KeyNames.ENTER.equals(EventHandler.getKey())) {
                    event.cancel();
                }
            }
        });

Thanks.

In Firefox, that code works fine.
In Chrome/IE (8.x) don’t.