Thank you for reporting this bug. We will make it our priority to review this report.
-
Menu.getRefItems should check also if Menu is destroyed
Menu.getRefItems should check also if Menu is destroyed, otherwise when querying for a component within the same parent container, the Menu.getRefItems throws an error.
Fiddle: https://fiddle.sencha.com/#fiddle/1ii6
Steps to reproduce:
1. Click button: "click me first"
2. Close the menu with the close button.
3. Click button "after close, click me to query" .
4. check console.
-
I think you've posted this before, I don't really think there's a bug here.
You should call setMenu(null) if you're going to destroy the menu.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-

Originally Posted by
evant
I think you've posted this before, I don't really think there's a bug here.
Yes, thought that I need to re-prhase and add the steps.

Originally Posted by
evant
You should call setMenu(null) if you're going to destroy the menu.
If by default closeAction config is destroy, I think it should be also by default that check in getRefItems, otherwise for each menu (look in image, there are mores menu which you can't see) I need to call setMenu(null) which is not an solution because I have lots of menus and to me seems more logical and more performant to override getRefItems and add that check myself, if is missing in the framework. But again I still think it should be there, once you provide by default some configs then those should work without problems.
Screen Shot 2016-10-18 at 7.32.03 AM.jpg