-
21 Apr 2011 12:39 AM #1
EditorGridPanel -delay in firing Blur Event causes Bug
EditorGridPanel -delay in firing Blur Event causes Bug
I have EditorGridPanel inside the Ext.Window with a Save button . When editing some field and clicking the Save button right away (without explicitly leaving the Editor with Tab or Enter ) , the grid store will be updated after the Save button handler , and thus non-updated data will be posted to server .I wonder … It's weird that this bug is reproducible only when the EditorGridPanel is inside Ext.Window . I couldn’t reproduce it when it's just inside some div in the Body.
The cause for this in my opinion is the following line in the initEvents method of Ext.form.Field:
this.mon(this.el, 'blur', this.onBlur, this, this.inEditor ? {buffer:10} : null);
The 10 mili-seconds delay causes the save button handler to fire before the "complete" event of the Editor.
Tested Ext versions: 3.0.3 and 3.3.0.
Tested Browsers: IE8 – happens always. FF 3.6 and Safari 4.0.5 – happens randomly.
OS : Windows XP.
I attach a JS code which is based on edit-grid.js of Ext examples, slightly altered to demo the bug. In this example the Save button just prints the contents of the Grids Store .
The scenario to reproduce the bug is at the beginning of this message.
In fact I can't understand why there is any scenario, which allows this code to work despite the 'blur' delay ….
-
25 May 2011 1:30 AM #2
So , no response or sugestions from the Ext team ?
So , no response or sugestions from the Ext team ?
So, no response or suggestions from the Ext team ?
(By the way this bug randomly happens under Ext 4 either )
-
21 Jul 2011 11:50 AM #3
I'm seeing the same problem in IE8. Haven't seen the problem in IE9 or Firefox.
edit:
I was able to resolve the problem by calling stopEditing() on the grid inside the button handler.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Tap delay on list items and erroneous firing of event for double tap (1.0.1a)
By wdonne in forum Sencha Touch 1.x: BugsReplies: 5Last Post: 27 Jun 2011, 2:31 PM -
[CLOSED][3.2-beta]Ext.form.Field -> blur-event not always firing
By tobiu in forum Ext 3.x: BugsReplies: 6Last Post: 14 Apr 2010, 11:54 AM -
[RESOLVED] How to use event blur in numberfield in EditorGridPanel
By Rafael in forum Ext 2.x: Help & DiscussionReplies: 14Last Post: 16 Mar 2009, 9:34 PM -
blur event is firing many times.
By yakubraja in forum Ext 2.x: Help & DiscussionReplies: 11Last Post: 24 Apr 2008, 6:04 AM


Reply With Quote