Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with keybindings #45

Open
rjahn opened this issue Apr 30, 2015 · 1 comment
Open

Problem with keybindings #45

rjahn opened this issue Apr 30, 2015 · 1 comment

Comments

@rjahn
Copy link

rjahn commented Apr 30, 2015

Keybindings don't works as expected if you define an action handler for the UI:

public class SimpleUI extends UI
{
  @Override
  protected void init(VaadinRequest request)
  {
    AceEditor ace = new AceEditor();
    ace.setMode(AceMode.java);
    ace.setTheme(AceTheme.tomorrow_night_bright);
    ace.setValue("public void functional(String pValue)\n{\n}");

    HorizontalLayout hlayout = new HorizontalLayout(ace);

    setContent(hlayout);

    addActionHandler(new Handler()
    {
      public void handleAction(Action action, Object sender, Object target)
      {
        //Global default button handling
      }

      public Action[] getActions(Object target, Object sender)
      {
        return new Action[] {new ShortcutAction("ENTER", ShortcutAction.KeyCode.ENTER, null)};
      }
    });
  }
}

ACE editor doesn't insert a newline with this example.

@EduFrazao
Copy link

Man, this is a serious bug. Any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants