Fix wrong hint mirror behaviour in Firefox

Change-Id: I9c6b2ff8e24d52bd6c4b4b7856c65946e25f1261
diff --git a/Changes b/Changes
index 470ead6..031ab69 100755
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 0.40 2020-10-09
         - Modernize ES and fix in-loops.
         - add roll() method to state object.
+        - Fix wrong hint-mirror behaviour in Firefox.
 
 0.39 2020-10-07
         - Add information on secret file to Readme.
diff --git a/dev/js/spec/hintSpec.js b/dev/js/spec/hintSpec.js
index f45496c..79726f3 100644
--- a/dev/js/spec/hintSpec.js
+++ b/dev/js/spec/hintSpec.js
@@ -61,7 +61,7 @@
   describe('KorAP.InputField', function () {
     beforeAll(beforeAllFunc);
     afterAll(afterAllFunc);
-    var input;
+    let input;
 
     beforeEach(function () {
       input = document.createElement("input");
diff --git a/dev/js/src/hint/input.js b/dev/js/src/hint/input.js
index 67d01f8..120a953 100644
--- a/dev/js/src/hint/input.js
+++ b/dev/js/src/hint/input.js
@@ -116,10 +116,10 @@
 
     // Reset position
     var mirrorStyle = this._mirror.style;
-    mirrorStyle.left = inputClientRect.left + "px";
-    mirrorStyle.top  = (inputClientRect.bottom - bodyClientRect.top) + "px";
+    mirrorStyle.left = parseInt(inputClientRect.left) + "px";
+    mirrorStyle.top  = parseInt(inputClientRect.bottom - bodyClientRect.top) + "px";
     mirrorStyle.width = inputStyle.getPropertyValue("width");
-    
+
     // These may be relevant in case of media depending css
     mirrorStyle.paddingLeft     = inputStyle.getPropertyValue("padding-left");
     mirrorStyle.marginLeft      = inputStyle.getPropertyValue("margin-left");