Opened 12 years ago
Closed 12 years ago
#350 closed defect (fixed)
WFSFilterBuilder - filter blur problem on tab switching
Reported by: | cdeschenes | Owned by: | cdeschenes |
---|---|---|---|
Priority: | minor | Milestone: | 1.2.0 |
Component: | widgets | Version: | |
Keywords: | tab, filters, focus | Cc: | adube, belug |
Description
When user define a filter and click directly to result tab, the value of filter textfield having focus is'nt updated until he loose focus. The result of this defect is that result list ignore last change in filters when result list is triguered by tabs change.
Attachments (2)
Change History (14)
by , 12 years ago
Attachment: | patch-wfsfilterbuilder-filterfocus-350-r1177-A0.diff added |
---|
comment:2 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Need another fix because current fix don't work with Internet Explorer
comment:4 by , 12 years ago
The "beforeTabChange" event don't seem to be executed before in Internet explorer. This issue explain the problem with my fix (in other browser, the focus is removed just before sending the request on tab change, in IE the focus is removed just after sending request and this is the reason because we have this issue in IE)
I thought to change the field onChange event listener for onKeyUp ... but I'm not sure that is the best way to fix the problem.
comment:5 by , 12 years ago
I also thought to directly fire the change event of the field when tabChange but, I'm not sure that this will fix the probleme because this event seem to have an issue in IE.
I'm not sure I can do fix for now...
comment:6 by , 12 years ago
Cc: | added |
---|
I have a proposition it's not user friendly but it would work. In IE, since it's the only one where it's broken, we could force the use of the apply filter button by deactivating the tab.
The deactivation of the tab has to be set too when selecting back the first tab, this could also be done on the first change of a filter option.
It would be working normaly in any browsers except IE where the events are broken.
What do you think?
comment:7 by , 12 years ago
I don't really like the idea of having a different behavior for IE.
Here's something else : how about we use the "beforeTabChange" event, check whatever has focus and force it to loose it first.
How about it ?
comment:8 by , 12 years ago
After looking more into it, it's not that the event is not fired, it's that a lot of events are fired in the same time and in IE the request start before the change event has finished.
I added an alert in beforeTabChange and with the delay this add, everything is ok.
The problem is, once again, the javascript asynchrone way of doing things.. but for this time it's only in IE. I'll check if a can add a litte delay somewhere...
comment:9 by , 12 years ago
Here i have a small not intrusive solution that keep he same behavior in each browsers. But it's not something I like to do, but sometimes it has to be used.
In WFSFilterBuilderButton.js line 286 i have changed this :
activate: { fn: function() { if(this.wfsFilterBuilderButton.autoFilter) this.doFilter() }, scope: this.filterBuilderSelector }
For this :
activate: { fn: function() { if(this.wfsFilterBuilderButton.autoFilter) Ext.defer(this.doFilter, 50, this); }, scope: this.filterBuilderSelector }
The little delay that is added allow the filter to be stored correctly before being applied.
So is it ok like that?
comment:10 by , 12 years ago
I agree with the proposed solution. I won't say I like it very much either, but sometimes "The Dark Side is more quick, more attractive".
You can send a patch and I'll apply it. Thanks a lot.
by , 12 years ago
Attachment: | wfsfilterbuilder-IEBUG-350-r1258-A1.diff added |
---|
a fix that give focus to submit button just before switch tab