PDA

View Full Version : Two bugs with editable datagrid



ojintoad
26 Sep 2006, 10:44 AM
1:

When enabling a grid for editing in Firefox this lovely little error keeps cropping up.
Error: [Exception... "'Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://10.1.0.238/workingcopper/yuigrid/yui-ext/yui-ext.js :: anonymous :: line 343" data: no]
Source File: http://10.1.0.238/workingcopper/yuigrid/yui-ext/yui-ext.js
Line: 343

After a few edits I've noticed sometimes I can't click on the firefox location bar anymore or any other cells on the grid to edit it.

2:

Maybe this was reported and fixed, I haven't tried it with the current DataGrid, but in using the example editable version on your blog, putting in 13/13/13 on a date will get interpreted as January 13, 2014. I would have expected it to revert to the prior inserted date? 14/14/14 doesn't get interpreted, but does the expected revert.
Edit: I see now that it isn't meant to correct poorly formatted dates but rather it is just reverting 14/14/14 because it is a weekend. (15/15/15 and others work as well, as they should.)

I'll provide more specifics if needed.

jack.slocum
26 Sep 2006, 2:17 PM
1. I did manage to reproduce this silent error (it's in a try/catch). It is caused by calling "focus()" from script in an event handler.

The solution is simple, turn off auto complete on those fields. It's fixed and will be in .32.1.

2. The date parsing code auto corrects dates which it can. It comes from
this library (http://www.xaprb.com/blog/2006/05/14/javascript-date-formatting-benchmarks/). If you don't like the logic of the parsing code, it would be easy to plug in your own library. That library is awesome though, it's performance is extraordinary.