fixes #2302 File edit does not work with Firefox

Fixed the issue and committed code for review, please check it.