[ 
https://jira.jboss.org/jira/browse/RF-7255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12470647#action_12470647
 ] 

German Escobar commented on RF-7255:
------------------------------------

After digging through the code, I found that the problem was in the 
RichFaces.Selection.getStart of the suggestionbox.js. It should be something 
like this:

Richfaces.Selection.getStart = function(element)
{
        if (element.setSelectionRange) {
                return element.selectionStart;
        } else if (document.selection && document.selection.createRange) {
                var range1 = document.selection.createRange();
                var range2 = range1.duplicate();
                range2.moveToElementText(element); // works only for textarea
                                          //range2.expand("textedit"); // works 
only for input text
                range2.setEndPoint("StartToStart", range1);
                return element.value.length - range2.text.length;
        }
}

As you can see, there is one line that has to be changed accordingly for 
textarea or input text. I think maybe testing if it is a textarea component 
should do the trick.

I hope this code helps for future releases.

> suggestionbox for textarea with tokens. second request not fired in IE
> ----------------------------------------------------------------------
>
>                 Key: RF-7255
>                 URL: https://jira.jboss.org/jira/browse/RF-7255
>             Project: RichFaces
>          Issue Type: Bug
>          Components: component-input
>    Affects Versions: 3.3.1
>            Reporter: Ilya Shaikovsky
>            Assignee: Nick Belaevski
>            Priority: Minor
>             Fix For: Future
>
>
> see forum thread.
> reproduced only for IE on my side too and also only for text area(for just 
> input works ok)
> checked at demo.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to