I have a visualforce page overriding the new button of an object. I need the vf page to run some custom validation. Eventually the user is redirected to the new record page of the object. Because that object isn't already on the Nav Bar a 'temporary tab' is produced, like above. Is there any way to customize this temporary tab, prevent it from appearing, or make it close when the new record modal closes ?
One solution I found was to just add the object to the Nav Bar, then lightning would use that tab for the new record modal, but then if the user removes it we're back to square one.