Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Bryan17
Posts: 6
Registered: ‎02-18-2012
My Device: PlayBook
Accepted Solution

DOM Modification Not Visible After Scrolling Overflow Element

[ Edited ]

Hello,

 

I'm working on a PlayBook WebWorks app and have run into an issue that seems like a bug in the rendering system.

 

I have a click callback method which updates some text and styles within a div. This always works correctly in ripple and usually works on the device. Sometimes though, it has no effect.

 

Using the web inspector, I can see my click method is invoked and completes without error. When I click on the elements tab to inspect the DOM, suddenly the DIV is updated with the correct appearance.

 

Here is a stripped down version of my code:

 

<ul id="list">
  <li data-id="One" class="green">One</li>
  <li data=id="Two" class="red">Two</li>
</ul>

<div id="details">
  <div id="title"></div>
</div>

$("#list li").click( function(e) {
    selectedElement = $(this).attr("data-lineId");
    console.log("click on " + selectedElement);
    $("#title").html(selectedElement);
    $("#details").removeClass().addClass($(this).attr("class")); 
    console.log("end click on " + selectedElement);
});

 Has anyone seen a similar problem before? Any suggestions on how to force a redraw?

 

Thanks

New Developer
Bryan17
Posts: 6
Registered: ‎02-18-2012
My Device: PlayBook

Re: DOM Modification Not Visible On Device

Update:

 

The unordered list has css style overflow-y: scroll.

 

I've narrowed the problem down to the case where I have just scrolled the list, then click on a list item. If I click anywhere outside of the list, the UI magically updates.

 

This seems to be the case for my top menu as well. After I have scrolled, I swipe down and nothing happens. Clicking anywhere outside the list, my menu appears.

 

Is there any known issue with overflow in general?

 

New Developer
Bryan17
Posts: 6
Registered: ‎02-18-2012
My Device: PlayBook

Re: DOM Modification Not Visible On Device

This is resolved in the OS2 final release!

BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: DOM Modification Not Visible On Device

I just opened this up to take a deeper look, lo and behold: resolution. Apologies for my delay here, but glad to see it worked out! Thanks for keeping us updated.

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.