2
votes

I'm new to ExtJS.

I've looked in documentation and tried few possible solutions, but nothing works. I need to change the default behaviour of menus.

I have a button that triggers a menu dropdown and it works all fine until the browser window is too small to show entire dropdown, in which case it undocks and ExtJS is trying to fit it in the window.

I need it to stay where it is, relative to the button that triggered it.

How can I do this in ExtJS?

Thanks.

1

1 Answers

2
votes

Not sure how you are showing the menu, but you can try to use the position parameter on Ext.menu.MenuView.showBy method in order to force it to stay in the same place always.

menu.showBy(button, 'tl-bl')

You can see a working example on how to use it here

I know that has passed about a week since you made the question, but I hope it helps to solve your problem if you are still facing it.