Skip to content

Commit 6c8f1d9

Browse files
committed
fix(*): rolling back some faulty changes
1 parent df8e4fc commit 6c8f1d9

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

src/js/modules/infragistics.ui.combo.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,14 +3481,14 @@
34813481
selRange.moveStart("character", start);
34823482
selRange.moveEnd("character", end);
34833483
selRange.trigger("select");
3484-
field.trigger("focus");
3484+
field.focus();
34853485
} else if (field.setSelectionRange) {
3486-
field.trigger("focus");
3486+
field.focus();
34873487
field.setSelectionRange(start, end);
34883488
} else if (typeof field.selectionStart !== "undefined") {
34893489
field.selectionStart = start;
34903490
field.selectionEnd = end;
3491-
field.trigger("focus");
3491+
field.focus();
34923492
}
34933493
},
34943494
_hasInputSelection: function () {
@@ -4122,7 +4122,7 @@
41224122
this._options.preventItemSeparatorOnFocus = preventItemSeparatorOnFocus;
41234123

41244124
if (!$input.is(":focus")) {
4125-
input.trigger("focus");
4125+
input.focus();
41264126
} else {
41274127

41284128
// Trigger focus handler to reset the flags
@@ -4373,7 +4373,7 @@
43734373

43744374
// Chrome does not move the carret if input wasn't focused initially
43754375
// This happens when while the focus was in the input we have clicked somewhere inside the input to move the carret ourself
4376-
this._options.$input.trigger("focus");
4376+
this._options.$input.focus();
43774377
this._moveCaretToInputEnd(true);
43784378

43794379
// Prevent carret from being set to where user clicked

src/js/modules/infragistics.ui.dialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@
11001100
if (targ === elem[ 0 ] || (targ === min && shift) || (targ === max && !shift)) {
11011101
_stopEvt(e);
11021102
el = shift ? max : min;
1103-
try { el.trigger("focus"); } catch (ex) { }
1103+
try { el.focus(); } catch (ex) { }
11041104
}
11051105
})
11061106
.on("mousedown", function (e) { self.moveToTop(e); });
@@ -2032,7 +2032,7 @@
20322032
self._hasFocus = true;
20332033
}
20342034
elem = elem || self.element[ 0 ];
2035-
elem.trigger("focus");
2035+
elem.focus();
20362036
}
20372037
} catch (ex) {}
20382038
}, 100);

src/js/modules/infragistics.ui.editors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,9 @@
10391039
_setFocusDelay: function (delay) {
10401040
var self = this;
10411041
if (delay) {
1042-
this._timeouts.push(setTimeout(function () { self.field().trigger("focus"); }, delay));
1042+
this._timeouts.push(setTimeout(function () { self.field().focus(); }, delay));
10431043
} else {
1044-
this.field().trigger("focus");
1044+
this.field().focus();
10451045
}
10461046
},
10471047
_setFocus: function (event) {
@@ -11882,13 +11882,13 @@
1188211882

1188311883
// Note: Don't preventDefault (all changes in this handler will be ignored) - set value back instead:
1188411884
self._valueInput[ 0 ].checked = internalChecked;
11885-
this.trigger("focus");
11885+
this.focus();
1188611886
}
1188711887
self._toggleInternal(event);
1188811888
},
1188911889
"mousedown.editor": function (event) {
1189011890
/* Prevent multi-click text selection, but keep focus */
11891-
this.trigger("focus");
11891+
this.focus();
1189211892
event.preventDefault();
1189311893
return false;
1189411894
},

src/js/modules/infragistics.ui.htmleditor.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,7 @@
17811781
// }
17821782
//},
17831783
_execCommand: function (name, args) {
1784-
this._selectionWrapperSaved.trigger("focus");
1784+
this._selectionWrapperSaved.focus();
17851785

17861786
// R.K. 7th February 2017 #774: Font and fontsize do not change in IE11
17871787
// R.K. 14th September 2017 #1188: Text in html editor is not styled in corresponding font-color
@@ -1884,7 +1884,7 @@
18841884
var target = $(e.target);
18851885

18861886
if (target.is("html")) {
1887-
self.workspace.contentWindow.document.body.trigger("focus");
1887+
self.workspace.contentWindow.document.body.focus();
18881888
}
18891889
self._isDirty = true;
18901890
self._hideDialogs();
@@ -1989,7 +1989,7 @@
19891989
language: this.options.language,
19901990
locale: this.options.locale,
19911991
applyform: function (e, ui) {
1992-
self._selectionWrapperSaved.trigger("focus");
1992+
self._selectionWrapperSaved.focus();
19931993
self._selectionWrapperSaved.replaceNode(ui.image);
19941994
}
19951995
});
@@ -2025,7 +2025,7 @@
20252025
language: this.options.language,
20262026
locale: this.options.locale,
20272027
applyform: function (e, ui) {
2028-
self._selectionWrapperSaved.trigger("focus");
2028+
self._selectionWrapperSaved.focus();
20292029
self._selectionWrapperSaved.replaceNode(ui.anchor);
20302030
}
20312031
});
@@ -2179,7 +2179,7 @@
21792179
.igPathFinder({
21802180
click: function (e, ui) {
21812181
var selectionWrapper = self._selectionWrapperSaved;
2182-
self.workspace.contentWindow.document.body.trigger("focus");
2182+
self.workspace.contentWindow.document.body.focus();
21832183
if (self._domPathToolbar.igPathFinder("option", "disabled")) {
21842184
return;
21852185
}
@@ -3472,7 +3472,7 @@
34723472
if (focusTarget.length > 0) {
34733473
this._range.setStart(focusTarget[ 0 ], 0);
34743474
this._range.setEnd(focusTarget[ 0 ], 0);
3475-
this._document.body.trigger("focus");
3475+
this._document.body.focus();
34763476
}
34773477
} else {
34783478

@@ -3498,7 +3498,7 @@
34983498

34993499
// Return the focus to the body
35003500
// FireFox needs focus to execude commands such as fontName
3501-
this._document.body.trigger("focus");
3501+
this._document.body.focus();
35023502
}
35033503
}
35043504
}

src/js/modules/infragistics.ui.rating.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,9 @@
769769

770770
// get around bugs in IE9
771771
if (me._foc && document.hasFocus && !document.hasFocus()) {
772-
return setTimeout(function () { me.trigger("focus"); }, 0);
772+
return setTimeout(function () { me.focus(); }, 0);
773773
}
774-
me.trigger("focus");
774+
me.focus();
775775
}
776776

777777
// mousemove
@@ -1093,7 +1093,7 @@
10931093
*/
10941094
if (this._foc) {
10951095
try {
1096-
this._foc[ 0 ].trigger("focus");
1096+
this._foc[ 0 ].focus();
10971097
} catch (ex) {}
10981098
}
10991099
return this;

tests/unit/editors/dateEditor/dateEditor-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,7 @@ QUnit.test('Test backspace/delete while editing', function (assert) {
17601760

17611761
//delete :
17621762
$field.val("10/10/1010 PM");
1763-
$field[0].trigger("select");
1763+
$field[0].select();
17641764
util.keyDownChar(46, $field);
17651765
assert.equal($field.val(), "__/__/____ __", "Delete did not clear the editor input.");
17661766
assert.ok(($field[0].selectionStart === $field[0].selectionEnd) && ($field[0].selectionStart === 13), "Cursor not at end after delete.");

tests/unit/editors/maskEditor/mask-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,13 +898,13 @@ QUnit.test('[ID19] Mask editor paste and insert', function (assert) {
898898
}).then(function () {
899899
assert.equal(editorInput[0].selectionStart, 14, "Selection start should be 14 after paste");
900900
assert.equal(editorInput.val(), "57-2a/BC(test)", "Editor text after paste should be 57-2a/BC(test)");
901-
editorInput[0].trigger("select");
901+
editorInput[0].select();
902902
$.ig.TestUtil.keyInteraction(8, editorInput);
903903
$.ig.TestUtil.paste(editorInput[0], "57-2a");
904904
return $.ig.TestUtil.wait(20);
905905
}).then(function () {
906906
assert.equal(editorInput[0].selectionStart, 5, "Selection start should be 5 after paste");
907-
editorInput[0].trigger("select");
907+
editorInput[0].select();
908908
assert.equal(editorInput.val(), "57-2a/__(test)", "Editor text after paste should be 57-2a/__(test)");
909909
$.ig.TestUtil.paste(editorInput[0], "572a/bc");
910910
return $.ig.TestUtil.wait(20);

tests/unit/editors/numericEditor/numericEditor-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -804,17 +804,17 @@ QUnit.test("Convert between Scientific and fixed-point formats (dateMode, scient
804804
scientificFormat: "E+"
805805
});
806806

807-
$editor.trigger("focus")[0].trigger("select");
807+
$editor.trigger("focus")[0].select();
808808
this.util.paste($editor[0], "100");
809809
this.util.wait(20).then(function () {
810810
assert.equal($editor.val(), "1E2", "Edit Text not as expected on scientific format value paste.");
811-
$editor[0].trigger("select");
811+
$editor[0].select();
812812
util.paste($editor[0], "1e-22");
813813
return util.wait(20);
814814
}).then(function () {
815815
assert.equal($editor.val(), "1E-22", "Edit Text not as expected on scientific format value paste.");
816816
$editor.igNumericEditor("option", "scientificFormat", "e+");
817-
$editor[0].trigger("select");
817+
$editor[0].select();
818818
util.paste($editor[0], "23e+1");
819819
return util.wait(20);
820820
}).then(function () {
@@ -979,7 +979,7 @@ QUnit.test("Typing negative signs (multiple prevention, leading, scientific)", f
979979
});
980980

981981
$editor.trigger("focus");
982-
$editor[0].trigger("select");
982+
$editor[0].select();
983983
this.util.keyInteraction(45, $editor);
984984
assert.equal($editor.val(), "-", "Negative sign was not allowed to repalce entire value");
985985

@@ -1047,7 +1047,7 @@ QUnit.test("Typing multiple exponent chars (scientific E-notation)", function (a
10471047
});
10481048

10491049
$editor.trigger("focus");
1050-
$editor[0].trigger("select");
1050+
$editor.select();
10511051
this.util.keyInteraction(101, $editor, "shiftKey");
10521052
assert.equal($editor.val(), "1E-7", "E character should not be allowed to replace entire value");
10531053

@@ -1072,7 +1072,7 @@ QUnit.test("Typing multiple exponent chars (scientific E-notation)", function (a
10721072
});
10731073

10741074
$editor.trigger("focus");
1075-
$editor[0].trigger("select");
1075+
$editor[0].select();
10761076
this.util.keyInteraction(101, $editor);
10771077
assert.equal($editor.val(), "1e-27", "e character should not be allowed to repalce entire value");
10781078

tests/unit/editors/timePicker/timepicker-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ function pressEnterKey(){
801801
input().trigger($.Event('keydown', {which: 13, keyCode: 13}));
802802
}
803803
function setCursorAt(pos){
804-
input()[0].trigger("focus");
804+
input()[0].focus();
805805
input()[0].setSelectionRange(pos, pos);
806806
};
807807
//function dropDownValues(hDelta, mDelta, start = "", end = ""){

tests/unit/splitter/splitter-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ QUnit.test('Test 14: igSplitter widget keyboard navigation.', function (assert)
794794
ID: 'sKbNav'
795795
};
796796
this.addSplitter(options);
797-
$('div[tabindex="0"]')[0].trigger("focus");
797+
$('div[tabindex="0"]')[0].focus();
798798
var container = $('#sKbNav'), bar = $($(container.children())[1]), sliptbars = panel1 = panel2 = null;
799799
panel1 = $($(container.children())[0]);
800800
panel2 = $($(container.children())[2]);

0 commit comments

Comments
 (0)