This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 196236

Summary: xml scrolling
Product: xml Reporter: holub <holub>
Component: APIAssignee: Svata Dedic <sdedic>
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic, super_bizon, zohar
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description holub 2011-03-03 15:01:37 UTC
* open long xml file
* insert something and do not save the changes
* use mouse scroll to scroll down to the end of document
* document scrolling, but at the some time focus returns up to the unsaved changes

Product Version = NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Operating System = Linux version 2.6.37-2-686-bigmem running on i386
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) Client VM 19.1-b02
Comment 1 holub 2011-03-30 06:43:42 UTC
Reproduced on RC1
Comment 2 super_bizon 2011-05-25 08:58:09 UTC
Reproduced in 7.0 release at windows platform.
Comment 3 Marian Mirilovic 2011-08-02 05:35:19 UTC
>10 dups + votes -> P2 based on http://wiki.netbeans.org/BugPriorityGuidelines
Comment 4 Svata Dedic 2011-09-16 14:15:37 UTC
Does the "scroll to change" occur repeatedly ? I was able to reproduce this behaviour when:
* I opened a long document
* I modified some text
* *Immediately* after that, I scrolled down using mousewheel/scrollbar

Then the editor scrolled back exactly once (after ~2 secs, which might be when the background parsing of the modified contents finished). If I continued to scroll down the document, no more re-positionings happened.

Is that what you see ?

* Does the editor scroll back *only* once ? 
* If you wait some seconds after you make the modifications to the document, *then* scroll down: does the editor also scrolls back as you reported ?

Thanks for clarifying.
Comment 5 Svata Dedic 2011-09-19 13:28:11 UTC
Seems to happen because Fold hierarchy removes and then re-adds all folds. Changed the code so that the view only re-scrolls when a new collapsed fold appears around the caret's position - so far I've observed no negative effects.
Comment 6 Svata Dedic 2011-09-23 09:24:44 UTC
*** Bug 18860 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2011-09-23 13:22:04 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/4ec078d4b61e
User: Svata Dedic <sdedic@netbeans.org>
Log: #196236: only scroll to current position of code folding actually changed something nearby the caret. Otherwise leave the viewport as it is