Skip to content

Commit 69f48f8

Browse files
author
Roman Lytvynenko
committed
MAGETWO-99535: Frontend email login on Safari cursor issue
1 parent 0055cbc commit 69f48f8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/web/mage/trim-input.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ define([
4242
*/
4343
_trimInput: function () {
4444
// Safari caret position workaround: storing carter position
45-
const caretStart = this.options.cache.input.get(0).selectionStart;
46-
const caretEnd = this.options.cache.input.get(0).selectionEnd;
45+
var caretStart, caretEnd, input;
4746

48-
var input = this._getInputValue().trim();
47+
caretStart = this.options.cache.input.get(0).selectionStart;
48+
caretEnd = this.options.cache.input.get(0).selectionEnd;
49+
50+
input = this._getInputValue().trim();
4951

5052
this.options.cache.input.val(input);
5153

0 commit comments

Comments
 (0)