[jbosstools-issues] [JBoss JIRA] (JBIDE-9548) StringIndexOutOfBoundsException possilbe during selection text nodes

Denis Maliarevich (Commented) (JIRA) jira-events at lists.jboss.org
Thu Nov 3 04:08:45 EDT 2011


    [ https://issues.jboss.org/browse/JBIDE-9548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639565#comment-12639565 ] 

Denis Maliarevich commented on JBIDE-9548:
------------------------------------------

First of all, we *DO USE* <span> for text nodes -- thus StringIndexOutOfBoundsException will never happen for us at this time.
Nevertheless your note about length=0 and sourcePosition=1 does make sense.
I'll update the code.
                
> StringIndexOutOfBoundsException possilbe during selection text nodes
> --------------------------------------------------------------------
>
>                 Key: JBIDE-9548
>                 URL: https://issues.jboss.org/browse/JBIDE-9548
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Visual Page Editor core
>    Affects Versions: 3.3.0.M2
>            Reporter: Maxim Areshkau
>            Assignee: Denis Maliarevich
>             Fix For: 3.3.0.M3
>
>         Attachments: exception.log, jbide-9548-2.patch, jbide-9548.patch
>
>
> StringIndexOutOfBoundsException possilbe during selection text nodes when we not wrap text nodes into span(see template for text nodes);
> In some cases wrap text nodes into span broke layout. But if we change template for text nodes to not wrap into span it brokes selections. 
> #1 Create page with followint content "<html><body>test1<p>test2</p></body></html>"
> #2 try to select from test1 till test2 in source page
> #3 out of bounds exception will be thrown.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list