updateValueText function

- created new function to update constant value text
- implemented function on 'enter' and clicking outside the box