<div dir="ltr"><div>Maybe this information is also useful: if the pushPinButtonView function is changed (like below) to always maintain the button in the DOM and show and hide it by setting the display attribute value to none or initial respectively, the bug also does not show up.<br></div><div><br></div><div><div>fun pushPinButtonView isVisibleSource isActiveSource onclick =</div><div>    let val dynClass =</div><div><span class="" style="white-space:pre">       </span>    isActive <- signal isActiveSource;</div><div><span class="" style="white-space:pre">        </span>    return (classes (CLASS "btn btn_sm pull_right")</div><div><span class="" style="white-space:pre">                    </span>    (if isActive then btn_primary else btn_default))</div><div><span class="" style="white-space:pre">     </span>    </div><div><span class="" style="white-space:pre">     </span>val dynStyle =</div><div><span class="" style="white-space:pre">     </span>    isVisible <- signal isVisibleSource;</div><div><span class="" style="white-space:pre">      </span>    return (if isVisible</div><div><span class="" style="white-space:pre">         </span>    then STYLE "display: initial"</div><div><span class="" style="white-space:pre">              </span>    else STYLE "display: none")</div><div>    in</div><div><span class="" style="white-space:pre"> </span>return</div><div><span class="" style="white-space:pre">     </span>    <xml></div><div><span class="" style="white-space:pre">  </span>      <button dynClass={dynClass} dynStyle={dynStyle} onclick={onclick}></div><div><span class="" style="white-space:pre">          </span><i class="glyphicon glyphicon_pushpin"></i></div><div><span class="" style="white-space:pre">          </span>&nbsp;</div><div><span class="" style="white-space:pre"> </span>      </button></div><div><span class="" style="white-space:pre">   </span>    </xml></div><div>    end</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 9:22 AM, Saulo Araujo <span dir="ltr"><<a href="mailto:saulo2@gmail.com" target="_blank">saulo2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_extra">Hi Adam,</div><div class="gmail_extra"><br></div><div class="gmail_extra">It took me some time, but after a lot of code removal (FFI, database and logic) I believe I have a small test case that shows the bug. You can get it with the command</div><div class="gmail_extra"><br></div><div class="gmail_extra">git clone -b bug <a href="https://github.com/saulo2/timesheet-ur.git" target="_blank">https://github.com/saulo2/timesheet-ur.git</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">To reproduce the bug, follow the steps below:</div><div class="gmail_extra"><br></div><div class="gmail_extra">1) click the first button (a list of other buttons will be shown below the first button)</div><div class="gmail_extra">2) click the button associated to "Project 1"</div><div class="gmail_extra">3) click the first button again (the list of buttons will be hidden)</div><div class="gmail_extra">4) click the first button one last time (a JavaScript alert saying "Failed to execute append child on Node..." will be shown)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, I found out that if you change line 76 from</div><div class="gmail_extra"><br></div><div class="gmail_extra"><button dynClass={dynClass} onclick={onclick}></div><div class="gmail_extra"><br></div><div class="gmail_extra">to</div><div class="gmail_extra"><br></div><div class="gmail_extra"><button onclick={onclick}></div><div class="gmail_extra"><br></div><div class="gmail_extra">the bug does not show up. Therefore, maybe the bug is related to the dynClass JavaScript function.</div><div class="gmail_extra"><br></div><div class="gmail_extra">If is there anything else that I can do to help, please let me know.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Sincerely,</div><div class="gmail_extra">Saulo</div></div></div>
</blockquote></div><br></div>