if (editor.focusedColumnIndexDOM < 0) {
widget = null;
} else {
- widget = editor
- .getWidget(getColumn(editor.focusedColumnIndexDOM));
+ widget = editor.getWidget(
+ getVisibleColumn(editor.focusedColumnIndexDOM));
}
EditorDomEvent<T> editorEvent = new EditorDomEvent<T>(
@Test
public void testKeyboardSave() {
selectMenuPath(EDIT_ITEM_100);
-
WebElement textField = getEditorWidgets().get(0);
+ textField.click();
+ // without this, the click in the middle of the field might not be after
+ // the old text on some browsers
+ new Actions(getDriver()).sendKeys(Keys.END).perform();
+ textField.sendKeys(" changed");
+ // Save from keyboard
+ new Actions(getDriver()).sendKeys(Keys.ENTER).perform();
+ assertEditorClosed();
+ assertEquals("(100, 0) changed",
+ getGridElement().getCell(100, 0).getText());
+ }
+
+ @Test
+ public void testKeyboardSaveWithHiddenColumn() {
+ selectMenuPath("Component", "Columns", "Column 0", "Hidden");
+ selectMenuPath(EDIT_ITEM_100);
+
+ WebElement textField = getEditorWidgets().get(1);
textField.click();
// without this, the click in the middle of the field might not be after
new Actions(getDriver()).sendKeys(Keys.ENTER).perform();
assertEditorClosed();
- assertEquals("(100, 0) changed",
- getGridElement().getCell(100, 0).getText());
+ assertEquals("(100, 2) changed",
+ getGridElement().getCell(100, 1).getText());
}
@Test