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.
Created attachment 148415 [details] screencast Please try following: - create ResponseRabbits sample project - run it in Chrome with NB integration - turn on inspect mode - in CSS Styles window, switch to Document - expand for instance the 1st css file node - click on any css rule - click on another css rule => CSS Style window is repopulating by itself, the only way to get it working back again is to restart IDE. See the attached screencast for reference Product Version: NetBeans IDE Dev (Build web-main-1110-on-20140730) Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)
This issue is not specific to page inspection. It can be reproduced using the following steps (that do not run any page in any browser). 1. Open CSS Styles view (using Window > Web > CSS Styles view) 2. Open index.html from ResponsiveRabbits sample project in Editor => the context of CSS Styles view is set to index.html => Document tab appears in CSS Styles view 3. Select the Document tab in CSS Styles view. 4. Expand css/bootstrap.css node. 5. Click on the first rule/child of the expanded node. 6. Click on the second rule/child of the expanded node. => the selection will jump between these two nodes If you click on any other node then this node joins the "selection dance party" ;-).
*** Bug 247092 has been marked as a duplicate of this bug. ***
When a new rule is set through RuleEditorController then two calls are made: setModel() followed by setRule(). When setModel() is invoked then the rule that corresponds to the old selected rule (in the old model) is found and is selected. Unfortunately, this generates a rule-change event. Next the setRule() is invoked and the selected rule is set correctly to the desired value. Then the unfortunate event is processed and results in another invocation of setModel() and setRule() methods (with the old rule) etc. Schematically (rule A is the selected rule at the beginning): * selectRule(B) is invoked * setModel() -> A selected event fired * setRule(B) -> rule B is selected, B selected event fired * A selected event processed i.e. selectRule(A) is invoked * setModel() -> B selected event fired (as B is the selected rule by now) * setRule(A') -> rule A' is selected, A selected event fired * etc. I have workarounded this problem by ignoring the unfortunate event fired by setModel(). Modified file: https://hg.netbeans.org/web-main/rev/faee90cf8409
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/faee90cf8409 User: Jan Stola <jstola@netbeans.org> Log: #246134: CSS Styles window repopulating in endless loop
Integrated into 'main-silver', will be available in build *201507300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/376bde7a7672 User: Jan Stola <jstola@netbeans.org> Log: Improving the fix of issue #246134.