harold92 / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Text Selection Broken After Document Update #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
*** This issue was imported from http://java.net/jira/browse/XHTMLRENDERER-212

It was reported by chrisw1229 on 29.01.2008 21:08:28 +0100 and last updated in 
the previous bug tracker on 20.07.2008 21:33:52 +0200

Found in
Operating System: All
Platform: All

The priority for this issue at migration was Major.
The original issue had attachments to it; see comments below.

Original description: 
If new content is added to the document and it is reloaded with
XHTMLPanel#reloadDocument(Document), then the text selection does not work at 
all.

Original issue reported on code.google.com by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
Attachment by chrisw1229 on 27.02.2008 21:17:33 +0100:  SelectionTest.java, 
size 3937 bytes
Download: http://java.net/jira/secure/attachment/27348/SelectionTest.java

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
nitsk wrote on 27.02.2008 18:18:56 +0100:
Works for me - testing that exact function. Are you sure you weren't working
with an older version from cvs? 

If you can reproduce this, please attach the code/sample files/steps

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
chrisw1229 wrote on 27.02.2008 18:26:30 +0100:
I was testing the R8pre2 release from the homepage...if you have made changes
since then in CVS, I can test again with that.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
chrisw1229 wrote on 27.02.2008 21:17:33 +0100:
Created an attachment (id=45)
A test case for selection highlighting after a document update.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
chrisw1229 wrote on 27.02.2008 21:18:56 +0100:
Okay, I can provide more details about this problem now. I am running CVS head
for this test case.

1.) Load document content into the XHTML panel from a string.
2.) Highlight some text.
3.) Get the Document object and append a new element to the body (this
represents a new chat message in my case).
4.) Call the reloadDocument or setDocument method to display the new content.
5.) Try to highlight something again and nothing happens.

Now, perhaps reloadDocument should not work in this case since the documentation
talks about it being used to update the styles. The recommendation from the
mailing list was that it was still okay to use that method if I was just tacking
stuff onto the end only, as it would be faster. So I also tried setDocument,
which still seems to perform okay for me, but it did not work either. Oh and as
a workaround, selection will work again if I re-install a selection handler
after updating the document.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
pdoubleya wrote on 20.07.2008 21:26:27 +0200:
Need to re-evaluate with the latest patches to selection; will decide before R8
final if it's fixed or will be deferred.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 8 years ago
pdoubleya wrote on 20.07.2008 21:33:52 +0200:
Assigning to me, at least to verify if this is still a problem.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:54