This is a weird one.

I want to highlight (change the class) to some objectBox nodes in the HTML
panel.
The HTML in the page looks like:

<div>
  text node
  <p>a paragraph</p>
  another text node
  <p>another paragraph</p>
</div>

I cycle through the div children, and I just change the class of the
objectBox node, so it will get highlighted as I need. The relevant code I am
using inside the loop is:

  var objectBox = htmlPanel.ioBox.createObjectBox(childNode[i]);
  setClass(objectBox, "my-highlight");

The weird thing is that if I put a breakpoint at the line "var
objectBox...." stop and resume the needed times, everything goes as
expected: all 3 nodes get the additional class and get highlighted as I
need.

But if I remove the breakpoint and I just run the code, the text nodes get
highlighted (i.e. keep the class) for a fraction of a second, and then they
return almost imediately to their original state (the change is barely
noticeable, and not all the times), while the other <p> retain the class
with or without the stop-resume at the breakpoint.

What is happening? Why the breakpont seems to fix/hide the problem? What
code could change the class back to its original state, after I set it, and
why it is not doing that with the stop at the breakpoint?

Any clue will be very appreciated. Thank you.

Domizio

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to