Explanation : when we right click on application for contextmenu below error is coming in browser console
Uncaught TypeError: this.overlay.position(...).connectedTo is not a function
at ContextMenuService.openContextMenu (vendor.js:44911:62)
at ContextMenuComponent.onMenuEvent (vendor.js:45076:34)
at SafeSubscriber._next (vendor.js:45059:18)
at SafeSubscriber.__tryOrUnsub (vendor.js:47244:16)
at SafeSubscriber.next (vendor.js:47183:22)
at Subscriber._next (vendor.js:47133:26)
at Subscriber.next (vendor.js:47110:18)
at Subject.next (vendor.js:46894:25)
source code:
this.contextMenuService.show.next({
anchorElement: fakeElement,
// Optional - if unspecified, all context menu components will open
contextMenu: this.efileCustomContextMenu.basicMenu,
event: $event,
item: item,
});
Related
I am working on integrating the Bryntum Kanban board into an EXTJS application. In the top toolbar of the kanban, I have an ExtJS combobox that changes the view so that users can view their private taskboard as well as the taskboard for their groups. (Users can be in more than one group) When the view is changed, both the statestore that populates the columns of the taskboard and the userstore that populates the userpicker need to reload, as well as the taskstore. The problem is that after the view is changed, clicking on a task throws two errors:
Uncaught TypeError: can't access property "getRange", this.selected is null
ExtJS 2
relayMethod http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:6471
map ExtJS
relayMethod http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:6470
deselectAll http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:6446
deselectAll http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:7431
onDragStarting http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:7532
ExtJS 4
getDragData http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:4896
ExtJS 86
ext-all-debug.js:200495:9
and
Uncaught TypeError: can't access property "getRange", this.selected is null
ExtJS 2
deselectAllInOtherSelectionModels http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:6465
each ExtJS
forEachSelModel http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:6475
deselectAllInOtherSelectionModels http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:6464
deselectAllInOtherViews http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:7385
onTaskClick http://dev.southern-air.com/javascript/taskboard/taskboard-all-debug.js:7381
ExtJS 2
ext-all-debug.js:200495:9
Here is the code for the change listener on the combobox:
change: function (field, newValue) {
var ts = Ext.data.StoreManager.lookup('taskstore');
var ss = Ext.data.StoreManager.lookup('statestore');
var us = Ext.data.StoreManager.lookup('userstore');
var taskboard = field.up('mytaskboard');
console.log(taskboard);
ts.getProxy().setExtraParam('view', newValue);
ss.getProxy().setExtraParam('view', newValue);
us.getProxy().setExtraParam('view', newValue);
taskboard.deselectAll();
ss.reload({
callback: function () {
// taskboard.deselectAll();
taskboard.refresh();
us.reload({
callback: function () {
taskboard.userMenu.picker.refresh();
ts.reload({
callback: function () {
console.log(taskboard);
}
});
}
});
}
});
}
Is there anything that I need to do before I reload the stores to ensure that this error is not thrown? If anyone has also had this problem I'd appreciate your solutions. I have tried deselecting all before reloading, as you can see in the code above, but that doesn't help either.
After troubleshooting, I was able to find a solution that seems to be working. I had to add the following line to the change listener before reloading the stores:
delete field.up('mytaskboard').selModel;
This line deletes all the selection models from the taskboard, which were the things that were causing the problem in the first place. Now the views change and everything works as expected. I am still interested to know if this may cause other issues down the line though.
I am getting really weird error. In my test, I first navigate to angularjs.org. Then I sendKeys() to an input field called "JavaScript Projects" which has filters in it. After that I click a checkbox and mark a todo item as Done. However, on doing this, it get the error,
UnknownError: unknown error: Element is not clickable at point (713, 6). Other element would receive the click: ...
(Session info: chrome=43.0.2357.81)
If I reverse the order of my execution above, no error occurs.
Here is my Code
var util = require ('util');
describe ("Page object text", function() {
var homepage = require('../pages/angularjs_page.js');
it ("Should mark an item done", function() {
homepage.get();
browser.sleep(2000);
homepage.searchText('jquery');
homepage.markDoneTodo(0);
});
});
Here is the page object code:
var angularjs_page = function() {
this.get = function() {
browser.get('http://www.angularjs.org');
};
this.markDoneTodo = function(index) {
element.all(by.repeater('todo in todoList.todos'))
.get(index)
.element(by.model('todo.done'))
.click();
};
this.searchText = function(txt) {
element(by.model('projectList.search')).sendKeys(txt);
};
};
module.exports = new angularjs_page();
Maximizing the browser window did not work. Sleep() does not seem to be causing this issue. Inserting a sendKey() method in between works fine.
browser.sleep(2000);
homepage.searchText('jquery');
homepage.enterName("Hello World");
homepage.markDoneTodo(0);
So, what is wrong with executing searchText() and markDoneTodo() methods in sequence?
Problem Found
Turns out that the static top navigation menu bar was overlapping the checkboxes. Is scrolling the best way to solve it, and how?
Using scroll solved the problem.
browser.executeScript('window.scrollTo(0,document.body.scrollHeight)');
Uncaught TypeError: Cannot read property 'apply' of undefined ext-all-rtl-debug.js?_dc=1434006887415:122446Ext.define.getDisplayValue ext-all-rtl-debug.js?_dc=1434006887415:122446Ext.define.updateValue ext-all-rtl-debug.js?_dc=1434006887415:122405Ext.define.onValueCollectionEndUpdate ext-all-rtl-debug.js?_dc=1434006887415:122187fire ext-all-rtl-debug.js?_dc=1434006887415:11803doFireEvent ext-all-rtl-debug.js?_dc=1434006887415:12332fireEventArgs ext-all-rtl-debug.js?_dc=1434006887415:12300Ext.define.notify ext-all-rtl-debug.js?_dc=1434006887415:44074Ext.define.endUpdate ext-all-rtl-debug.js?_dc=1434006887415:42996Ext.define.doSetValue ext-all-rtl-debug.js?_dc=1434006887415:122369Ext.define.setValue ext-all-rtl-debug.js?_dc=1434006887415:122270Ext.define.setValueOnData ext-all-rtl-debug.js?_dc=1434006887415:121833Ext.define.bindStore ext-all-rtl-debug.js?_dc=1434006887415:121774Ext.define.setStore ext-all-rtl-debug.js?_dc=1434006887415:78436(anonymous function) ext-all-rtl-debug.js?_dc=1434006887415:6243Ext.define.bindStore ext-all-rtl-debug.js?_dc=1434006887415:121769Ext.define.setStore ext-all-rtl-debug.js?_dc=1434006887415:78436Ext.Configurator.configure ext-all-rtl-debug.js?_dc=1434006887415:6645Ext.Base.Base.addMembers.initConfig ext-all-rtl-debug.js?_dc=1434006887415:7424Ext.define.constructor ext-all-rtl-debug.js?_dc=1434006887415:39045constructor ext-all-rtl-debug.js?_dc=1434006887415:7660Ext.ClassManager.Ext.apply.widget ext-all-rtl-debug.js?_dc=1434006887415:8934Ext.define.create ext-all-rtl-debug.js?_dc=1434006887415:14599Ext.define.lookupComponent ext-all-rtl-debug.js?_dc=1434006887415:76363Ext.define.privates.prepareItems ext-all-rtl-debug.js?_dc=1434006887415:76752Ext.define.add ext-all-rtl-debug.js?_dc=1434006887415:75977Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:76301Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:88789Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:119267Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:76269Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:88783Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:119247Ext.define.constructor ext-all-rtl-debug.js?_dc=1434006887415:39089constructor ext-all-rtl-debug.js?_dc=1434006887415:7660Ext.ClassManager.Ext.apply.widget ext-all-rtl-debug.js?_dc=1434006887415:8934Ext.define.create ext-all-rtl-debug.js?_dc=1434006887415:14599Ext.define.lookupComponent ext-all-rtl-debug.js?_dc=1434006887415:76363Ext.define.privates.prepareItems ext-all-rtl-debug.js?_dc=1434006887415:76752Ext.define.add ext-all-rtl-debug.js?_dc=1434006887415:75977Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:76301Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:76269Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:118849Ext.define.constructor ext-all-rtl-debug.js?_dc=1434006887415:39089constructor ext-all-rtl-debug.js?_dc=1434006887415:7660Ext.ClassManager.Ext.apply.widget ext-all-rtl-debug.js?_dc=1434006887415:8934Ext.define.create ext-all-rtl-debug.js?_dc=1434006887415:14599Ext.define.lookupComponent ext-all-rtl-debug.js?_dc=1434006887415:76363Ext.define.privates.prepareItems ext-all-rtl-debug.js?_dc=1434006887415:76752Ext.define.add ext-all-rtl-debug.js?_dc=1434006887415:75977Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:76301Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:88789Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initItems ext-all-rtl-debug.js?_dc=1434006887415:119267Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:76269Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:88783Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.initComponent ext-all-rtl-debug.js?_dc=1434006887415:119247Ext.define.constructor ext-all-rtl-debug.js?_dc=1434006887415:39089constructor ext-all-rtl-debug.js?_dc=1434006887415:7660(anonymous function) VM2495:3Ext.ClassManager.Ext.apply.create ext-all-rtl-debug.js?_dc=1434006887415:8897Ext.ClassManager.Ext.apply.instantiateByAlias ext-all-rtl-debug.js?_dc=1434006887415:8721Ext.Function.ExtFunction.alias ext-all-rtl-debug.js?_dc=1434006887415:4450Ext.define.OnSubMenuItemClick MenuDataView.js?_dc=1434006888341:51fire ext-all-rtl-debug.js?_dc=1434006887415:11803Ext.define.dispatch ext-all-rtl-debug.js?_dc=1434006887415:33357Ext.Base.Base.addMembers.callParent ext-all-rtl-debug.js?_dc=1434006887415:7381Ext.define.dispatch ext-all-rtl-debug.js?_dc=1434006887415:33539prototype.doFireEvent ext-all-rtl-debug.js?_dc=1434006887415:33465fireEventArgs ext-all-rtl-debug.js?_dc=1434006887415:12300fireEvent ext-all-rtl-debug.js?_dc=1434006887415:12274Ext.define.processUIEvent ext-all-rtl-debug.js?_dc=1434006887415:95171Ext.define.handleEvent ext-all-rtl-debug.js?_dc=1434006887415:95123fire ext-all-rtl-debug.js?_dc=1434006887415:11803Ext.define.fire ext-all-rtl-debug.js?_dc=1434006887415:18548Ext.define.publish ext-all-rtl-debug.js?_dc=1434006887415:18524Ext.define.doDelegatedEvent ext-all-rtl-debug.js?_dc=1434006887415:18574Ext.define.onDelegatedEvent ext-all-rtl-debug.js?_dc=1434006887415:18561Ext.Function.ExtFunction.bind.method
Ext.override(Ext.form.ComboBox,
{
getDisplayValue: function () {
//return this.lastSelectionText;
return this.selection!=null?this.selection.get('DisplayValue'):this.lastSelection;
}
});
I got the answer..
ARIA enabled combobox gives me
TypeError: a is undefined
in Firefox whenever I click on the trigger. And obviously with the error clicking the trigger doesn't show any data.
Disabling ARIA, it works fine.
In Chrome, I get this error
Uncaught TypeError: Cannot read property 'isVisible' of undefined ext-aria.js:1
Ext.define.getErrorTipOwner ext-aria.js:1
Ext.define.onFocus ext-aria.js:1
Base.implement.callParent ext-all-debug.js:4266
Ext.define.onFocus ext-all-debug.js:87675
Base.implement.callParent ext-all-debug.js:4266
Ext.define.onFocus ext-all-debug.js:92499
Ext.define.onTriggerClick ext-all-debug.js:97364
Ext.define.onTriggerWrapClick ext-all-debug.js:92583
(anonymous function) VM122:6
wrap
Again Firefox' error:
TypeError: a is undefined
...rm.FieldContainer",ariaRole:"group",ariaGetEl:function(){return this.getTargetEl...
On using ext-aria-debug.js the error is on the following
TypeError: tip is undefined
if (tip.isVisible()) {
This is where the error is:
getErrorTipOwner: function() {
var tip = this.tip;
if (tip.isVisible()) {
return tip.ownerField;
}
return null;
},
I have a problem trying to display collection items, in particular I get an error on collection.each() function:
getTodo: function(){
this.todos = new TodosCollection;
this.todos.query = new Parse.Query("test");
this.todos.fetch({
success:function(obj){
console.log(obj.length);
obj.each(this.addOne);
}
});
},
addOne: function(todo){
console.log(todo);
}
with this code I get this error:
Uncaught TypeError: undefined is not a function
console.log(obj.lenght) is != 0, so where is the error?
The this from which you call the addOne method is the callback, not your object - and the callback's property addOne is undefined, so you're trying to call undefined as a function. You can bind the callback to the object scope this way:
success: _.bind(function(obj){
obj.each(this.addOne);
}, this)