Keep active item pane editing field open when window loses focus
Closes #153
This commit is contained in:
		
					parent
					
						
							
								d82f8e91dc
							
						
					
				
			
			
				commit
				
					
						0b3b296e28
					
				
			
		
					 1 changed files with 17 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1467,9 +1467,24 @@
 | 
			
		|||
					
 | 
			
		||||
					t.select();
 | 
			
		||||
					
 | 
			
		||||
					// Leave text field open when window loses focus
 | 
			
		||||
					var ignoreBlur = function () {
 | 
			
		||||
						this.ignoreBlur = true;
 | 
			
		||||
					}.bind(this);
 | 
			
		||||
					var unignoreBlur = function () {
 | 
			
		||||
						this.ignoreBlur = false;
 | 
			
		||||
					}.bind(this);
 | 
			
		||||
					addEventListener("deactivate", ignoreBlur);
 | 
			
		||||
					addEventListener("activate", unignoreBlur);
 | 
			
		||||
					
 | 
			
		||||
					t.addEventListener('blur', function () {
 | 
			
		||||
						document.getBindingParent(this).blurHandler(this);
 | 
			
		||||
					}, false);
 | 
			
		||||
						var self = document.getBindingParent(this);
 | 
			
		||||
						if (self.ignoreBlur) return;
 | 
			
		||||
						
 | 
			
		||||
						removeEventListener("deactivate", ignoreBlur);
 | 
			
		||||
						removeEventListener("activate", unignoreBlur);
 | 
			
		||||
						self.blurHandler(this);
 | 
			
		||||
					});
 | 
			
		||||
					t.setAttribute('onkeypress', "return document.getBindingParent(this).handleKeyPress(event)");
 | 
			
		||||
					
 | 
			
		||||
					this._tabDirection = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue