Opened 9 years ago

Closed 9 years ago

#15963 closed defect (patchwelcome)

error caused by Pagination.js in lite.js, tabindex should be quoted in query

Reported by: jonny Owned by: Evan
Priority: undecided Milestone: tbd
Component: DojoX Grid Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:


In rows 175 (_onFocus function) and 196 (_onBlur function) of dojox/grid/enhanced/plugins/Pagination.js
node = query('[tabindex=' + tabindex + ']', this._pager.domNode)[0];
should be changed to
node = query("[tabindex='" + tabindex + "']", this._pager.domNode)[0];

Firefox (13.0.1 & 15.0.1) and Internet Explorer (9.0) throws otherwise an error:
uncaught exception: [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (SyntaxError?)" location: "dojo/selector/lite.js Line: 123"]
respectively SCRIPT5022: DOM Exception: SYNTAX_ERR (12) lite.js, line 123 offset 3

(sorry for my bad english...)`

<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Test</title></head><body>
	<div id="foo">
		<input type="text" tabindex="3" value="baz" id="bar">
	<script type="text/javascript">
		// document.getElementById('foo').querySelectorAll("[tabindex=3]"); // error
		alert(document.getElementById('foo').querySelectorAll("[tabindex='3']")); // work fine

Change History (2)

comment:1 Changed 9 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:2 Changed 9 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.