After that I can not see anymore the File and List category in the ribbon bar.
I read somewhere that with custom code the page became an application page (before was list page).
Clicking on the focus of the list solve the problem
How can I make always visible that ribbon items by code?
I've had this problem before and never explored a solution until now.
Don't use the script editor, instead just open the view aspx within SharePoint Designer and in 'PlaceHolderAdditionalPageHead' you can add your script without loosing the ribbon. Tested in SP 2013 on AllItems.aspx
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server"> <script> alert('Ribbon still present!'); </script> <SharePoint:RssLink runat="server"/> </asp:content>
thx for asking