Unremovable shortcut and TextArea

Hello,

Below I attached simple Vaadin application which extracts the problem I cannot resolve up to now.
First ENTER is set to be the shortcut key for the OK button, which is the only component of the application.
After clicking this button (or pressing ENTER key) we switch to another view containing textArea.
Although the shortcut has been removed the textArea does not accept the ENTER key (one cannot break lines using ENTER) - why ? In real application this problem may propagate to many succesive forms containing textfields. What is interesting, refreshing the page helps and ENTER starts to work correctly.
What I am doing wrong ? Or is it a bug ?

package com.example.vaadintests;

import com.vaadin.Application;
import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.ui.Button;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;

public class VaadintestsApplication extends Application {
	@Override
	public void init() {
		final Window mainWindow = new Window("Shortcut ...");
		
		final Button button = new Button("Ok");
		button.setClickShortcut(KeyCode.ENTER);
		button.addListener(new ClickListener()
		{
			@Override
			public void buttonClick(ClickEvent event)
			{
				button.removeClickShortcut();
				mainWindow.removeAllComponents();
				TextField textArea = new TextField("Enter key malfunctioning below");
				textArea.setRows(5);
				textArea.setColumns(20);
				textArea.focus();
				mainWindow.addComponent(textArea);
			}
		});
		mainWindow.addComponent(button);
		
		setMainWindow(mainWindow);
	}
}

Hello again - nobody is able to comment on this topic ?

Most likely a bug on the client side implementation that won’t remove the key listener even though the listener is removed on the server side. Can you check if the client send a HTTP request when you hit ENTER (keyboard event sent to server)?

OK,

  1. The client sends POST when pressing ENTER (but ENTER does not work)
  2. The client does not send any request when pressing Shift+ENTER (which functions correctly on client side)

After reloading the page both 1 and 2 behave identically i.e. no request is sent and client side behavior is correct

Hi,

Just to note for other forum readers, this issue is ticketed and fixed for the next maintenance release:

http://dev.vaadin.com/ticket/5539#comment:7

cheers,
matti