I have a form in modal pop up that is poped up(dynamically created) on click of button from another pop up where I am using a lightning:buttonIcon and on click of it, even if no code is written, the whole page refreshes. This happens in classic as well as lightning experience. This is really strange as I don't have same IDs neither do I have any refresh action mentioned on click. If I use or this problem does not occur.
Following is the markup code of inner modal form:
<aura:component >
<aura:attribute name="isField" type="Boolean" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<aura:attribute name="fieldValue" type="String" />
<!-- Field details start -->
<form aura:id="fieldDiv" class="slds-form--inline slds-hide">
<div aura:id="fieldName" class="slds-form-element">
<ui:inputText aura:id="fieldNameID" label="Sample Field"
class="slds-input"
labelClass="slds-form-element__label"
value="{!v.fieldValue}"
/>
</div>
<div class="slds-form-element">
<lightning:buttonIcon iconName="utility:check" size="large" variant="bare" onclick="{! c.handleFieldDone }" alternativeText="Done!" />
<div class="slds-icon_container slds-icon_containercircle">
<lightning:icon aura:id="doneFieldIcon" iconName="action:approval" size="small" alternativeText="Done" class="slds-hide"/>
</div>
</div>
</form>
<!-- Field details stop-->
Controller of inner modal form:
handleFieldDone : function(component, event, helper){
//helper.handleDone(component, true);
return false;
},