Thank you for your post.
I am unable to replicate the issue using FileMaker Pro Advanced 14.0.4 under Windows 8.1. This is what I have done:
1. I opened a database file.
2. I opened the Script Debugger.
3. On a layout, I created a Popover button that opens a Popover with a text field.
4. In Browse Mode, I clicked the Popover button to open the Popover.
5. I executed a script, and as the first line of the script is highlighted in the Script Debugger, I clicked the pencil icon to edit the script.
Let me know what I'm doing differently than you.
Does this occur with all layouts with a Popover? Does this occur with a new file?