Fixed editing modals in firefox

Changed order of function definition/calling
Merge pull request #41 from knowledge-map/firefox-fix

Fixed editing modals in firefox