PDA

View Full Version : [FIXED] Ext.ux.IFrame: Uncaught TypeError



nmorado
5 Apr 2014, 11:48 AM
How to replicate:
Using ExtJS 5.x default app, use a couple of Ext.ux.IFrame in the tab panel.

Error:
Uncaught TypeError: Cannot call method 'on' of undefined IFrame.js?_dc=1396726800639:128 (http://localhost/ext/src/ux/IFrame.js?_dc=1396726800639)

Ext.define.onLoadIFrame.js?_dc=1396726800639:128 (http://localhost/ext/src/ux/IFrame.js?_dc=1396726800639)
Ext.define.doFireController.js?_dc=1396726800639:244 (http://localhost/ext/packages/sencha-core/src/event/Controller.js?_dc=1396726800639)
Ext.define.fireController.js?_dc=1396726800639:122 (http://localhost/ext/packages/sencha-core/src/event/Controller.js?_dc=1396726800639)
Ext.define.dispatchDirectEventDispatcher.js?_dc=1396726800639:494 (http://localhost/ext/packages/sencha-core/src/event/Dispatcher.js?_dc=1396726800639)
Ext.define.onDirectEventDom.js?_dc=1396726800639:662 (http://localhost/ext/packages/sencha-core/src/event/publisher/Dom.js?_dc=1396726800639)

mitchellsimoens
8 Apr 2014, 6:44 AM
We actually already have a bug open for this but have linked this thread to the issue.

nmorado
25 Apr 2014, 6:27 AM
Thanks

sytel
3 Jul 2014, 6:35 AM
this is because Component.renderSelectors is deprecated.to fix it, please patch the IFrame.js:childEls: { iframeEl: { selectNode: 'iframe' }}initComponent: function () { this.callParent(); this.frameName = this.frameName || this.id + '-frame';}

sytel
3 Jul 2014, 6:36 AM
This is because Component.renderSelectors is deprecated. To fix it, please patch the IFrame.js:



childEls: {
iframeEl: { selectNode: 'iframe' }
}


initComponent: function () {
this.callParent();
this.frameName = this.frameName || this.id + '-frame';
}

simon
6 Aug 2014, 6:11 AM
I have the same error but on different line:
Ext.EventManager.on(this.getWin(), 'beforeunload', me.cleanupListeners, me);

"Uncaught TypeError: Cannot read property 'on' of undefined "

What should i change?

sprakash
23 Mar 2015, 1:42 AM
Just add comma in the below code.. it works fine.

This is because Component.renderSelectors is deprecated. To fix it, please patch the IFrame.js:



childEls: {
iframeEl: { selectNode: 'iframe' }
}


initComponent: function () {
this.callParent();
this.frameName = this.frameName || this.id + '-frame';
}