On Aug 27, 3:55 pm, Thomas Broyer <t.bro...@gmail.com> wrote: > On 27 août, 19:44, Tim Martens <timmy.mart...@gmail.com> wrote: > > > It boils down to a race condition between the content being updated > > and keystrokes in the TextBox. If they happen at the same time, > > rendering freezes. The only way I can prevent this from happening is > > to block the javascript event loop while I build/update the content. > > Which is obviously not a solution. This is a show stopper for us > > using GWT on the IPod Touch/IPhone. > > Is it at least a GWT issue? (re issue 3988 [1]) > > Did you try a similar pure-JS code? > <!DOCTYPE html> > <title>Will it kill the iPhone?</title> > <body> > <p><input type=text id=box> > <p id=label></p> > <script> > var box = document.getElementById("box"); > var label = document.getElementById("label"); > box.onkeyup = function() { > label.innerText = box.value;}; > > </script>
I had to modify the code slightly, but it works fine on my IPhone. <!DOCTYPE html> <title>Will it kill the iPhone?</title> <body> <p><input type=text id=box> <div id=label>Test</div> <script> var box = document.getElementById("box"); var label = document.getElementById("label"); box.onkeyup = function() { label.innerHTML = box.value; }; </script> I also tried setting a timeout to mimic the DeferredCommand I was using: setTimeout('label.innerHTML = box.value',250); Can't get the pure JS to crash the IPhone. Seems to me that it is a GWT issue... > > If it doesn't blow-up, try again wrapping everything in a <table> (to > simulate the VerticalPanel) in case their would a problem with the > <table> (you could then replace it with, say a FlowPanel in GWT); Tried using FlowPanels. Didn't seem to make a difference > otherwise, it's definitely an iPhone (safari mobile) bug, not a GWT > bug. > > What surprises me is that I tried a GWT app with SuggestBox on an > iPhone and didn't have a problem (maybe I didn't type fast enough to > trigger the issue), and suggestbox also updates the DOM while text is > being typed in... > > [1]http://code.google.com/p/google-web-toolkit/issues/detail?id=3988 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---