I had the same problem with Firefox 50.1.0 on Ubuntu 14.04.
Fix: Disable InstantFox add-on.
I tried repairing and rebuilding the
places.sqlite database in various ways as described here on mozillazine to no avail - I also had the same problem a couple of years ago on a different computer, and then rebuilding
places.sqlite helped, but not this time.
Then I solved it by disabling the InstantFox add-on. I picked this because I knew it is designed to manipulate text in the address bar. When the add-on is disabled, the address bar works normally. When InstantFox is enabled, the problem returns.
I have sent an e-mail to InstantFox with this information.
If you don't have InstantFox, try disabling other add-ons one by one and re-check. Pick the ones that have something to do with the address bar first.
I don't know if the root cause is in Firefox itself, Ubuntu, or the add-on.