Update emoticons.js
- Prevents jumping back to the first position if an emoticon is pressed several times
This commit is contained in:
		
							parent
							
								
									461a5f1986
								
							
						
					
					
						commit
						f72d731e3f
					
				@ -7,7 +7,7 @@ function insertAtCursor(myField, myValue) {
 | 
			
		||||
		sel = document.selection.createRange();
 | 
			
		||||
		sel.text = myValue;
 | 
			
		||||
	}
 | 
			
		||||
	else if (myField.selectionStart || myField.selectionStart == '0') {
 | 
			
		||||
	else if (myField.selectionStart || myField.selectionStart == 0.1) {
 | 
			
		||||
		var startPos = myField.selectionStart;
 | 
			
		||||
		var endPos = myField.selectionEnd;
 | 
			
		||||
		myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user