Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#15601 closed defect (invalid)

query.slice is not a function on hovering menubar item

Reported by: behemot Owned by: behemot
Priority: undecided Milestone: tbd
Component: General Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

A problem occurs only in the newest beta version of dojo i.e. 1.8.0B1.

I create a MenuBar component with a few items.

declare(MenuBar, {
		id: 'mainNavigationMenuBar', 
		startup: function() {
			this.addChild(new MenuBarItem({id: 'firstOptionId', label: resources.menuItem1, iconClass: 'menuItemI1Icon', onClick: function() {

It's shown as a menu correctly, but the click handler doesn't work at all, because earlier an error occurs. This error appears as soon as an user tries to focus menu bar item (moving the mouse over the item). In a firebug one can see that the following error exists: query.slice is not a function. It's a code from 104th line in acme.js (method called getQueryParts):

if(specials.indexOf(query.slice(-1)) >= 0)

I've debuged the problem a little and it turned out, that query type in normal situation is a string e.g."> .tabStripButton". But in this case for a menubar item hovering that method is called with a query which has type of function:

function (node) {
    return domClass.contains(node, "dijitMenuItem");

Obviously that's not correct query and for this type actually a method slice doesn't exist.

I have no idea from where this method is called. In version 1.7.2 this method isn't called at all during menu bar item hovering.

The same problem occurs during choice of fields by which filtering should be done on extended grid.

Attachments (2) (1.5 KB) - added by behemot 10 years ago.
index.html (937 bytes) - added by bill 10 years ago.
simplified test case

Download all attachments as: .zip

Change History (14)

comment:1 Changed 10 years ago by bill

Owner: set to behemot
Status: newpending

Sounds like you are talking about #14575, which we are leveraging in dijit to (as the ticket says) avoid a dojo.query() dependency.

However, test_Menu.html is working fine for me, so as always you need to attach a test case to reproduce the problem.

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser and use to reproduce then problem.

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.


comment:2 Changed 10 years ago by bill

Description: modified (diff)

Changed 10 years ago by behemot

Attachment: added

comment:3 Changed 10 years ago by behemot

Status: pendingnew

Attachment ( added by ticket reporter.

comment:4 Changed 10 years ago by behemot

Please find enclosed file as a test case for the reported bug.

Note, that you should the latest dojo version 1.8.0b1 put in js folder and dgrid installed e.g. with "cpm install dgrid" command executed.

comment:5 Changed 10 years ago by bill

Status: newpending

OK. There are a few strange things about your test case, like how it includes Toaster, and why it lists the claro css files individually after loading claro.css, and how it's using packages when it could all be put into one index.html file.

And, why do I need dgrid installed when the test isn't accessing it?

I'm having problems reproducing this. Try the attached test file and tell me if the problem reproduces for you.

Changed 10 years ago by bill

Attachment: index.html added

simplified test case

comment:6 Changed 10 years ago by behemot

Status: pendingnew

The case of incorrectly action exists only when a dgrid is installed. I can easily reproduce the problem with your test case too.

I use dgrid in my native application and it's required. It seems to me to be a kind of incompatibility between dgrid and dojo 1.8.0b1.

comment:7 Changed 10 years ago by bill

Status: newpending

I don't understand, you first said that

The case of incorrectly action exists only when a dgrid is installed.

but then

I can easily reproduce the problem with your test case too.

My test case doesn't reference dgrid at all. Are you claiming that merely copying the dgrid files to the server machine breaks things, even though the dgrid files are not referenced at all from index.html?

comment:8 Changed 10 years ago by behemot

Status: pendingnew

Yes, you are right, I can reproduce the failure with your testcase if I use dojo with installed dgrid. It doesn't matter that the dgrid classes are not used at all.

comment:9 Changed 10 years ago by bill

Status: newpending

OK, well it doesn't reproduce for me and I don't have a "cpm" command to install dgrid. Plus which, it's impossible that merely having the dgrid files on your computer would cause an error like this. Maybe when you installed dgrid it overwrote your copy of dojo, or something like that.

What are the exact steps, browser, and OS that you are using to reproduce this problem? Does it happen with ?

comment:10 Changed 10 years ago by behemot

Status: pendingnew

I uploaded testcase with attached dojo and dgrid installed on the board. It's available at:

It doesn't depend on OS because I reproduce the bug on Ubuntu as well as on Windows. The browser was Firefox 13.

Application at the given address works correctly.

comment:11 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed

OK thanks. The problem is on your end. Your are mixing dijit 1.8 (beta) with dojo core 1.7.3 (i.e. the dojo/ directory). That's not allowed. The versions need to match.

comment:12 Changed 10 years ago by behemot

Definitely it's a case of dgrid installer, which overwrites these dojo files. The cpm installer is recommended starting point for dgrid using (take a look at the

So I think currently it's impossible to use dgrid with 1.8.0B1 version (at least using this cpm installer).

Note: See TracTickets for help on using tickets.