var depassementDroit = (positionMessage.left + m.width()) - $("body").width();
if (depassementDroit > 0) {
positionMessage.left -= depassementDroit;\r
- }
- else if (positionMessage.left < 0) {
+ } else if (positionMessage.left < 0) {
positionMessage.left = 0;
}
if (input.setSelectionRange) {
input.focus();
input.setSelectionRange(selectionStart, selectionEnd);
- }
- else if (input.createTextRange) {
+ } else if (input.createTextRange) {
var range = input.createTextRange();
range.collapse(true);
range.moveEnd('character', selectionEnd);
if (selectionStart != selectionEnd) { // has there been a selection
this.setSelectionRange(input, selectionStart, selectionStart + replaceString.length);\r
- }
- else { // set caret
+ } else { // set caret
this.setCaretToPos(input, selectionStart + replaceString.length);\r
}
- }
- else if (document.selection) {
+ } else if (document.selection) {
input.focus();
var range = document.selection.createRange();
if (range.parentElement() == input) {