Annoyingly, I’ve not been able to pin down a reliable test case for this but it seems that often when I use the data structure element for the html.button method in the HTMLHelper I end up with the button rendered perfectly…but TWICE.
So if you have code like this:
#html.button(name="btnFlag", value="Flag")#
And you add the data structure
#html.button(name="btnFlag", value="Flag", data={toggle="modal", target="##flagModal"})#
You might in certain instances get that button rendered twice? It seemed to matter when I moved that line of code around within the .cfm page but I really can’t figure out why.
When it displays this behavior I notice that it will do it even if the data structure is empty.
#html.button(name="btnFlag", value="Flag", data={})#
If I just place the regular HTML code for that button in the exact same spot in the source code I only see the button once.
<button id="btnFlag" data-target="##flagModal" data-toggle="modal" name="btnFlagDiscrepancy">Flag</button>
Anyone else notice this? It smells weird and inconsistent and makes me think something else wrong with my own code or head…