-
8 Nov 2010 4:46 AM #1
Date field blur event on submit button click
Date field blur event on submit button click
Hello,
I have a task form with a target date field. when that date is changed so that the task is delayed, the change event triggers a dialog box that asks the user for the reason for this delay. the user's answer is saved in a hidden field.
Since the change event is triggered on blur, it happens also that the user gets this dialog box after clicking on "submit changes". however, it is not followed by the click event and so the form is not submitted, which is counter-intuitive to the user.
How can I discover that the click on the submit button caused the blur, so I can follow the dialog box with form submission ?
Thanks,
YaronYaron Yogev
IT Software Developer
-
8 Nov 2010 7:59 AM #2
Probably far from being the best solution... but you can try something like this. Listen to the mousedown event of the button and set a flag that means that the user meant to click the submit button. In your dialogbox callback function, check if that flag is true and if it is, perform the submit.
Code:{ text: 'Submit', listeners: { 'render': function() { this.btnEl.on({ 'mousedown': function() { form.submitNext = true; } }); } } }
-
8 Nov 2010 8:43 AM #3
Thanks. I'll try this.
Yaron Yogev
IT Software Developer
Similar Threads
-
[UNKNOWN][3.0svn/2.3] Blur event interferes with click event in Firefox
By Tom23 in forum Ext 3.x: BugsReplies: 2Last Post: 2 Jan 2012, 7:20 AM -
Click treeNode can not fire blur event when textfield is focused staus
By lionhx18 in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 18 Mar 2009, 9:26 PM -
How to add 'blur' event to Ext.Button? [SOLVED]
By dancas in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 7 Feb 2008, 11:56 AM -
possible bug on blur event for field
By hvgotcodes in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 13 Nov 2007, 10:41 AM


Reply With Quote