javascript - Chrome/Webkit inline-block refresh problem -


The problem I got is the following:

status : I have composite Div is a inline-block display. Inside there are two elements that have a inline block also displayed.

Then I (thanks for javascript) a & lt; Br / & gt; goes between the two elements on the next line, which is normal behavior.

Part of the buggy : & lt; Br / & gt; is then deleted (javascript again) and ... the display does not change. It appears that the composite box is not recalculated. In the end, I have two identical markups which are not seen in the same way (which is a bit problematic, not right).

This works fine on Firefox (it is based in WebKit as the Android browser behaves in the same way). So my question is, is there any such remedy which does not use methods that change the DOM?

Edit: As suggested by Duri, I have filled a bug report in WebKit Bugzilla, it is. But I'm still looking for an alternate solution ;)

Found my way: Remove all the children from the composite DIV, and then add all to the addition of BR:

  function removeBr () {var ahah = document.getElementById ("ah"); Var children = [], children; While (child = aah.firstChild) {if !! Child.tagName || Child.tagName.toLowerCase ()! == 'br') childs.push (child); Ahah.removeChild (child); } (Var i = 0; i & lt; childs.length; i ++) ahah.appendChild (child [i]); Other types:  
  function removeBr () {var node = $ ("#hah") [0]   

; Node.style.display = 'inline'; $ ("#ahah") removal of children ("br") .. SetTimeout (function () {node.style.display = '';}, 0); }

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -