Comments (5)
Hi @sirbris,
I have tried today to reproduce the issue using the demo within the add-on, but I haven't managed so far. My steps were:
- open context-menu
- navigate using arrow key up/down. This way there were no skipping the line occurrences.
Therefore, could you, please, share the demo application which illustrates the problem? Or, if it's not possible, to share gif/picture and describe your actions, that we would be able to reproduce the problem on our side also,
Thanks in advance!
from context-menu.
Here's a simple example:
- open context menu on the grid
- press key down
public class TestBean {
private String name = "name";
private String value = "value";
private boolean folder = false;
public TestBean(boolean inFolder) {
folder = inFolder;
}
public String getName() {
return name;
}
public void setName(String inName) {
name = inName;
}
public String getValue() {
return value;
}
public void setValue(String inValue) {
value = inValue;
}
public void setFolder(boolean inFolder) {
folder = inFolder;
}
public boolean isFolder() {
return folder;
}
}
private Grid<TestBean> grid = new Grid<TestBean>(TestBean.class);
private GridContextMenu<TestBean> contextMenu = new GridContextMenu<>(grid);
private ArrayList<TestBean> items = new ArrayList<>();
@Override
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
setContent(layout);
grid.setDataProvider(new ListDataProvider<>(items));
grid.setWidth("100%");
grid.setHeight("400px");
layout.addComponent(grid);
contextMenu.addContextMenuOpenListener(event -> handleOpen(event));
}
private void handleOpen(ContextMenuOpenEvent inEvent) {
contextMenu.removeItems();
contextMenu.addItem("test1", event -> System.out.println("clicked 1"));
contextMenu.addItem("test2", event -> System.out.println("clicked 2"));
contextMenu.addItem("test3", event -> System.out.println("clicked 3"));
contextMenu.addItem("test4", event -> System.out.println("clicked 4"));
contextMenu.addItem("test5", event -> System.out.println("clicked 5"));
}
from context-menu.
Thanks for the example! :)
Just to be sure, what version of Vaadin are you using?
I have tried to run the demo under context-menu itself, and everything works as expected; also it seems that it works alright in 8.1.7, but 8.4.3 produces already the behavior you see. Therefore, it looks like some change in the framework has affected the work of the addon, but it will require more investigation to be sure, of course.
from context-menu.
I use the current Vaadin 8.4.3 and also the current ContextMenu 2.1.0
from context-menu.
alright, thanks! : )
from context-menu.
Related Issues (20)
- Context menu with nothing added causes Javascript error
- java.lang.NoSuchMethodError on vaadin 8 after migration
- MenuItemImpl class shall be public on branch 2.0.0
- Vaadin 8.12.0 get warnings HOT 3
- GridContextMenuOpenEvent returns Object instead of T HOT 2
- After adding Gridcontextmenu everywhere visible HOT 3
- Add the possibility to hide the menu
- Error: Grid motion cursors stop responding HOT 5
- ERROR] Line 15: The constructor VOverlay(boolean, boolean, boolean) is undefined HOT 1
- When opening context menu with keyboard, it opens in top of window HOT 2
- Second time opening context menu (when still shown) does not work correctly HOT 2
- ContextMenu not opening HOT 8
- Nested ContextMenuItems not work properly HOT 2
- Arrow keys stop working after opening context menu HOT 3
- TreeGrid support HOT 1
- MenuItem should implement EventTrigger HOT 1
- HTML format not working HOT 3
- Compilation error with vaadin 8.6.0 HOT 6
- Small backward incompatible change
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from context-menu.