#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 )
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.inherited(arguments); 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)
Change History (14)
comment:1 Changed 9 years ago by
Owner: | set to behemot |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Description: | modified (diff) |
---|
Changed 9 years ago by
Attachment: | testcase.zip added |
---|
comment:3 Changed 9 years ago by
Status: | pending → new |
---|
Attachment (testcase.zip) added by ticket reporter.
comment:4 Changed 9 years ago by
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 9 years ago by
Status: | new → pending |
---|
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.
comment:6 Changed 9 years ago by
Status: | pending → new |
---|
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 9 years ago by
Status: | new → pending |
---|
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 9 years ago by
Status: | pending → new |
---|
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 9 years ago by
Status: | new → pending |
---|
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 http://bill.dojotoolkit.org/trunk/15601.html ?
comment:10 Changed 9 years ago by
Status: | pending → new |
---|
I uploaded testcase with attached dojo and dgrid installed on the board. It's available at: http://pieprzyca.pl/testcase.zip
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 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 9 years ago by
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 https://github.com/SitePen/dgrid/blob/master/README.md).
So I think currently it's impossible to use dgrid with 1.8.0B1 version (at least using this cpm installer).
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.
Thanks!