if I append a class or a button to the parent of the input, it also gets appended to the div with data-role="fieldcontain"

if I append a class or a button to the parent of the input, it also gets appended to the div with data-role="fieldcontain"

Hi,

for some reason, if I append a class or a button to the parent of the input, it also gets appended to the div with data-role="fieldcontain".  Is this by design?  

<div data-role="fieldcontain">
      <div>
            <input type="text" />
     </div>
</div>

thanks

Matt