#322 closed defect (fixed)
Query: Behavior of Clear and Checkbox for Spatial Filter is not consistent
Reported by: | jennyhe | Owned by: | madair |
---|---|---|---|
Priority: | P2 | Milestone: | Future |
Component: | Widgets | Version: | 1.1.1 |
Severity: | Major | Keywords: | |
Cc: | christine.bao@… | Browser: | All |
External ID: | 1276830 | Operating System: | All |
state: | New |
Description
Report from Autodesk QA
Steps:
- Open one flexible web layout by IE.
- Query
- Check Spatial Filter -> Draw Rectangle -> Clear
- Check Spatial Filter -> Draw Rectangle -> Uncheck Spatial Filter
Results: After Step3, the check box of Spatial Filter is unchecked, the rectangle is cleared. After Step4, the check box of Spatial Filter is unchecked, but the rectangle is still be there.
Expected results: Once Uncheck Spatial Filter, the rectangle should be cleared also.
Attachments (2)
Change History (10)
by , 15 years ago
Attachment: | Fix322.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
The patch looks fine Christine. It looks like the querymain.php file could use some cleanup at some point since some of the methods (e.g. ToggleSpatialFilter) no longer seem to do anything. But that is not required for this fix.
comment:3 by , 15 years ago
Thanks Chris for reviewing.
The patch is submitted to fix this defect.
Chris is right about the method ToggleSpatialFilter(bool). It's empty method indeed. However I'm not sure whether it's needed in the future, so I don't remove this method and the related function in query.php. Would someone know more about it cleanup the code or write some comments about why it's commented temporarily? Thanks.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 15 years ago
QA found the patch http://trac.osgeo.org/fusion/attachment/ticket/322/Fix322.patch fixed Firefox, Chrome and Safari, but IE still have this problem. After user uncheck "Spatial Filter" checkbox, the digitization is not cleared.
This is because the function OnToggleSpatialFilter() is not triggered after user uncheck the checkbox. OnChange() event is used to register OnToggleSpatialFilter():
<tr><td class="SubTitle"><input class="Ctrl" type="checkbox" onChange="OnToggleSpatialFilter()" id="spatialFilter"> Spatial Filter</td></tr>
However IE only fires the onchange event when the checkbox loses the focus, so it's not triggered immediately. To behave expectedly in IE, OnClick() should be used.
A good website to check these differences: http://krijnhoetmer.nl/stuff/javascript/checkbox-onchange/
by , 15 years ago
Attachment: | IEFix.patch added |
---|
comment:6 by , 15 years ago
Attach patch http://trac.osgeo.org/fusion/attachment/ticket/322/IEFix.patch for fixing in IE.
Attach patch http://trac.osgeo.org/fusion/attachment/ticket/322/Fix322.patch for fixing this defect.
Please review.