mirror of
				https://git.proxmox.com/git/mirror_xterm.js
				synced 2025-10-31 12:21:53 +00:00 
			
		
		
		
	Merge pull request #226 from Tyriar/208_fix_ime_popup_pos
Reposition textview after composition view
This commit is contained in:
		
						commit
						04cb9f33ff
					
				| @ -302,7 +302,7 @@ | ||||
|      * Positions the composition view on top of the cursor and the textarea just below it (so the | ||||
|      * IME helper dialog is positioned correctly). | ||||
|      */ | ||||
|     CompositionHelper.prototype.updateCompositionElements = function() { | ||||
|     CompositionHelper.prototype.updateCompositionElements = function(dontRecurse) { | ||||
|       if (!this.isComposing) { | ||||
|         return; | ||||
|       } | ||||
| @ -310,9 +310,13 @@ | ||||
|       if (cursor) { | ||||
|         this.compositionView.style.left = cursor.offsetLeft + 'px'; | ||||
|         this.compositionView.style.top = cursor.offsetTop + 'px'; | ||||
|         this.textarea.style.left = cursor.offsetLeft + 'px'; | ||||
|         var compositionViewBounds = this.compositionView.getBoundingClientRect(); | ||||
|         this.textarea.style.left = cursor.offsetLeft + compositionViewBounds.width + 'px'; | ||||
|         this.textarea.style.top = (cursor.offsetTop + cursor.offsetHeight) + 'px'; | ||||
|       } | ||||
|       if (!dontRecurse) { | ||||
|         setTimeout(this.updateCompositionElements.bind(this, true), 0); | ||||
|       } | ||||
|     }; | ||||
| 
 | ||||
|     /** | ||||
|  | ||||
| @ -14,6 +14,9 @@ describe('CompositionHelper', function () { | ||||
|         add: function () {}, | ||||
|         remove: function () {}, | ||||
|       }, | ||||
|       getBoundingClientRect: function () { | ||||
|         return { width: 0 } | ||||
|       }, | ||||
|       style: { | ||||
|         left: 0, | ||||
|         top: 0 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Imms
						Daniel Imms