Opened 7 years ago

Closed 7 years ago

#15596 closed defect (duplicate)

Data Grids cannot contain editable Dijits from 1.8.0 beta1

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

Description

I've just upgraded Dojo to 1.8 for some experimental features during development.

I've noticed that all of my DataGrids? which use custom cell types to provide editable functionality directly to the grid's store do not work.

I've tried to figure out why this is happening, but can't.

It appears, as though if you click/double click on the cell to start editing, the _Widget's "applyEdit" method is called instantly. And then the dijit loses focus. Previously in 1.7.x this was not the case.

If I had to guess, I'd peg it to the grid's focus manager.

See the bug in action here:

Double Click on the "Type" column to edit via the Select widget.

Works: http://download.dojotoolkit.org/release-1.7.3/dojo-release-1.7.3/dojox/grid/tests/test_data_grid_edit_dijit.html

1.8.0 Does not work: http://download.dojotoolkit.org/release-1.8.0b1/dojo-release-1.8.0b1/dojox/grid/tests/test_data_grid_edit_dijit.html

Change History (3)

comment:1 Changed 7 years ago by chrisacky

I've tracked the bug down to a commit /dijit

(I don't know how to use SVN, but here is the Git commit).

https://github.com/dojo/dijit/commit/6e51f0eacacf5d92c16cf5bd1ab44d2cb78e17f3

As I thought it was something to do with the focus manager. I'm going to step through the file and manually merge the changes to find out what the problem is.

I've also notice that this only occurs on Chrome. Seems to be a non-issue on other browsers.

comment:2 Changed 7 years ago by chrisacky

I've tracked down the bug.

It's caused by a change made to the dijit/focus.js file on line 236 (242 in the changed version), where the setTimeout is reduced from 100ms, to 0.

This probably explains the reason why it was only an issue in Chrome as well.

This needs to stay at 100ms.

this._clearActiveWidgetsTimer = setTimeout(lang.hitch(this, function(){
				delete this._clearActiveWidgetsTimer;
				this._setStack([]);
				this.prevNode = null;
			}), 100);

comment:3 Changed 7 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #15167.
Thanks for tracking this down. Turns out it was already reported, see #15167 (and #15133)

Note: See TracTickets for help on using tickets.