PDA

View Full Version : Grid Inline Edit FireFox Bug


bdcarter
04-17-2007, 10:33 AM
The grid crashes FireFox 2.0 when using inline editing. It occurs in my code along with your example Grid > Inline editing.

To replicate, edit a field and click on another field in the same row. I have tested on two different computers. IE 7.0 works fine. It only occurs is the field is actually changed to a new value.

mystix
04-17-2007, 10:47 AM
No such problem. i'm running FF2.0.0.3 with the FireBug plugin on WinXP with SP2. Tried your case on both the Ext 1.0 example here (http://extjs.com/deploy/ext-1.0/examples/grid/edit-grid.html), and from the downloaded version available here (http://extjs.com/download), without any issues.

bloudon
04-17-2007, 10:58 AM
We're on version 2.0 of Firefox, not 2.0.0.3 (I work with bdcarter). The cause of the crash may have been fixed between those two releases.

Version 1.5.0.11 (on a Mac, if it matters) does not have this problem.

mystix
04-17-2007, 12:18 PM
i just downgraded to FF2.0 and yes, i managed to replicate your problem on the 1.0 inline-grid example.

if it's possible in your environment you might want to consider a browser upgrade?

bloudon
04-17-2007, 12:18 PM
I have done some further testing.

The crash occurs at the call:

this.focusEl.focus.defer(1, this.focusEl);

The call is inside Ext.grid.GridView.focusCell, which is itself called at the end of Ext.grid.EditorGrid.onEditComplete.

mystix
04-17-2007, 12:22 PM
strange... all that does is defer the focus for 1 millisecond...

bloudon
04-17-2007, 12:28 PM
if it's possible in your environment you might want to consider a browser upgrade?

We are on an Active Directory system and have little control over software updates on our machines.

Also, we are building for a userbase that may not necessarily be running fully upgraded software. I'm not sure if we can get away with forcing them to make that upgrade. Discarding use of the EditorGrid in favor of an alternative interface is a more likely result.

bloudon
04-17-2007, 12:31 PM
strange... all that does is defer the focus for 1 millisecond...

Likely it is the call to focus() that occurs after that 1 millisecond. I'm still testing and may have more detailed information later.

mystix
04-17-2007, 12:47 PM
here's a solution (tested on FF2.0 and FF2.0.0.3): Ext.apply(Ext.grid.GridView.prototype, {
focusCell : function(row, col, hscroll) {
var el = this.ensureVisible(row, col, hscroll);
this.focusEl.alignTo(el, "tl-tl");
if (!Ext.isGecko) this.focusEl.focus.defer(1, this.focusEl);
else this.focusEl.focus();
}
});

add the code to your Ext overrides.

you'll have to check further with the Ext team though for a perm fix.

[edit]
pasted the wrong code twice.. arrgh
p.s. let me know if it works for you

bloudon
04-17-2007, 02:34 PM
p.s. let me know if it works for you

Seems to be working okay. No undesirable side effects so far.

Thanks.

jack.slocum
04-17-2007, 04:51 PM
Mystix, thanks for the fix. I will add it to the code.

mystix
04-17-2007, 09:48 PM
np :)

christocracy
06-04-2007, 05:51 PM
My buddy's firefox was crashing for same reason and this fixed it.
nice fix man!

brian.moeskau
06-04-2007, 06:19 PM
Your post reminded me of "my buddy" that I remember from childhood, but I doubt he's the same person:

http://www.dollinfo.com/mybud90s.htm