[
https://issues.apache.org/jira/browse/WICKET-3093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004397#comment-13004397
]
Rajeev commented on WICKET-3093:
---------------------------------
Hi Attila,
This is working fine in chrome. And below are the wicket ajax logs in IE and
chrome:
\==================================================IE=========================================================
INFO: focus set on searchboxd9
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:18:header:search:searchBoxForm:searchbox::IActivePageBehaviorListener:2:&wicket:ignoreIfNotActive=true&q=de&random=0.8631473635323346
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (9 characters)
INFO:
<ul></ul>
INFO: returned focused element: [object HTMLInputElement]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:18:header:search:searchBoxForm:searchbox::IActivePageBehaviorListener:2:&wicket:ignoreIfNotActive=true&q=del&random=0.26283549750223756
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (743 characters)
INFO:
<ul><li textvalue="DELL 2707WFP">DELL 2707WFP</li><li textvalue="DELL
2709W">DELL 2709W</li><li textvalue="DELL 3007WFP">DELL 3007WFP</li><li
textvalue="DELL 3007WFP-HC">DELL 3007WFP-HC</li><li textvalue="DELL 4220">DELL
4220</li><li textvalue="DELL 4320">DELL 4320</li><li textvalue="DELL
EC280">DELL EC280</li><li textvalue="DELL MINI 3">DELL MINI 3</li><li
textvalue="DELL MINI 5">DELL MINI 5</li><li textvalue="DELL S500">DELL
S500</li><li textvalue="DELL S500WI">DELL S500WI</li><li textvalue="DELL
ULTRASHARP U2711">DELL ULTRASHARP U2711</li><li textvalue="DELL ULTRASHARP
U3011">DELL ULTRASHARP U3011</li><li textvalue="Dell Enterprise Technology
Center">Dell Enterprise Technology Center</li><li textvalue="Why Dell">Why
Dell</li></ul>
INFO: returned focused element: [object HTMLInputElement]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: focus removed from searchboxd9
INFO: focus set on searchboxd9
INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:18:header:search:searchBoxForm:searchbox::IBehaviorListener:1:&random=0.7360630370676517
INFO: Invoking pre-call handler(s)...
INFO: returned focused element: [object HTMLInputElement]
INFO: Received ajax response (1855 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution
encoding="wicket1" ><![CDATA[<head
xmlns:wicket="http://wicket.apache.org"><script type="text/javascript"
src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>
<script type="text/javascript"
src="resources/org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior/wicket-autocomplete.js"></script>
</head>]]></header-contribution><component id="searchboxd9" ><![CDATA[<input
name="searchbox" type="text" class="searchbox" style="vertical-align: middle;"
value="DELL 2707WFP" id="searchboxd9" autocomplete="off" onchange="var
wcall=wicketAjaxPost('?wicket:interface=:18:header:search:searchBoxForm:searchbox::IBehaviorListener:1:-1',
wicketSerialize(Wicket.$('searchboxd9')),function() { }.bind(this),function()
{ }.bind(this), function() {return Wicket.$('searchboxd9') !=
null;}.bind(this));"/>]]></component><evaluate><![CDATA[new
Wicket.AutoComplete('searchboxd9','?wicket:interface=:18:header:search:searchBoxForm:searchbox::IActivePageBehaviorListener:2:-1&wicket:ignoreIfNotActive=true',{preselect:
false,maxHeight: -1,adjustInputWidth: true,useSmartPositioning:
false,useHideShowCoveredIEFix: true,showListOnEmptyInput:
false,showListOnFocusGain: false,throttleDelay:
300,showCompleteListOnFocusGain:
false},null);]]></evaluate><evaluate><![CDATA[document.getElementById('searchboxd9').focus();]]></evaluate></ajax-response>
INFO: Response parsed. Now invoking steps...
INFO: returned focused element: [object HTMLInputElement]
INFO: focus removed from searchboxd9 but ignored because of component
replacement
INFO: returned focused element: [object HTMLInputElement]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling focus on searchboxd9
INFO: focus removed from searchboxd9
===========================CHROME===============================================================================================================
INFO: focus set on searchboxa
INFO: Using ActiveX transport
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:0:header:search:searchBoxForm:searchbox::IActivePageBehaviorListener:2:&wicket:ignoreIfNotActive=true&q=dell&random=0.6844754613190659
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (743 characters)
INFO:
<ul><li textvalue="DELL 2707WFP">DELL 2707WFP</li><li textvalue="DELL
2709W">DELL 2709W</li><li textvalue="DELL 3007WFP">DELL 3007WFP</li><li
textvalue="DELL 3007WFP-HC">DELL 3007WFP-HC</li><li textvalue="DELL 4220">DELL
4220</li><li textvalue="DELL 4320">DELL 4320</li><li textvalue="DELL
EC280">DELL EC280</li><li textvalue="DELL MINI 3">DELL MINI 3</li><li
textvalue="DELL MINI 5">DELL MINI 5</li><li textvalue="DELL S500">DELL
S500</li><li textvalue="DELL S500WI">DELL S500WI</li><li textvalue="DELL
ULTRASHARP U2711">DELL ULTRASHARP U2711</li><li textvalue="DELL ULTRASHARP
U3011">DELL ULTRASHARP U3011</li><li textvalue="Dell Enterprise Technology
Center">Dell Enterprise Technology Center</li><li textvalue="Why Dell">Why
Dell</li></ul>
INFO: returned focused element: [object]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Using ActiveX transport
INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:0:header:search:searchBoxForm:searchbox::IBehaviorListener:1:&random=0.5342660827955734
INFO: Invoking pre-call handler(s)...
INFO: Calling focus on searchboxa
INFO: focus removed from searchboxa
INFO: focus set on searchboxa
INFO: Received ajax response (1839 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution
encoding="wicket1" ><![CDATA[<head
xmlns:wicket="http://wicket.apache.org"><script type="text/javascript"
src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>
<script type="text/javascript"
src="resources/org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior/wicket-autocomplete.js"></script>
</head>]]></header-contribution><component id="searchboxa" ><![CDATA[<input
name="searchbox" type="text" class="searchbox" style="vertical-align: middle;"
value="dell" id="searchboxa" autocomplete="off" onchange="var
wcall=wicketAjaxPost('?wicket:interface=:0:header:search:searchBoxForm:searchbox::IBehaviorListener:1:-1',
wicketSerialize(Wicket.$('searchboxa')),function() { }.bind(this),function() {
}.bind(this), function() {return Wicket.$('searchboxa') !=
null;}.bind(this));"/>]]></component><evaluate><![CDATA[new
Wicket.AutoComplete('searchboxa','?wicket:interface=:0:header:search:searchBoxForm:searchbox::IActivePageBehaviorListener:2:-1&wicket:ignoreIfNotActive=true',{preselect:
false,maxHeight: -1,adjustInputWidth: true,useSmartPositioning:
false,useHideShowCoveredIEFix: true,showListOnEmptyInput:
false,showListOnFocusGain: false,throttleDelay:
300,showCompleteListOnFocusGain:
false},null);]]></evaluate><evaluate><![CDATA[document.getElementById('searchboxa').focus();]]></evaluate></ajax-response>
INFO: Response parsed. Now invoking steps...
INFO: returned focused element: [object]
INFO: returned focused element: [object]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: focus set on searchboxa
INFO: refocus last focused component not needed/allowed
INFO: focus removed from searchboxa
So everything looks same except last few lines
INFO: returned focused element: [object HTMLInputElement]
INFO: focus removed from searchboxd9 but ignored because of component
replacement
INFO: returned focused element: [object HTMLInputElement]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling focus on searchboxd9
In Chrome its keeps focus on searchboxd9 while in IE it removes focus from this
field at the end.
> Self-updating AutoCompleteTextField moves focus to start of field in IE only
> ----------------------------------------------------------------------------
>
> Key: WICKET-3093
> URL: https://issues.apache.org/jira/browse/WICKET-3093
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.4.12
> Reporter: Alex Grant
> Assignee: Martin Grigorov
> Priority: Minor
> Attachments: WICKET-3093-autocomplete.zip, WicketTestProject.zip
>
>
> I have an AutoCompleteTextField that has a AjaxFormSubmitBehavior("onchange")
> attached so that we can canonicalise the value (eg correct the case)
> automatically. In IE only, when you pause long enough to trigger the
> AjaxFormSubmitBehavior, the cursor moves to the start of the text field, so
> if you type "123" slowly you may be "312".
> This is only an issue in IE as it is caused by WICKET-2279 - if I remove the
> javascript added for that bug the problem goes away.
> The problem can also be solved by changing AjaxFormSubmitBehavior("onchange")
> to AjaxFormSubmitBehavior("onblur"), but I still consider it a bug given it
> only occurs in IE - Firefox and Chrome behave correctly no matter what you do.
> Also, since the javascript added in WICKET-2279 starts with the comment "//
> hack for a focus issue in IE, WICKET-2279" I figured you'd like to know about
> any quirky behaviour it causes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira