second lockPageUI runs after there's no codebox anymore
This commit is contained in:
		
							parent
							
								
									ab98d46baa
								
							
						
					
					
						commit
						443e3a3c7c
					
				
							
								
								
									
										10
									
								
								edit/edit.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								edit/edit.js
									
									
									
									
									
								
							|  | @ -463,7 +463,7 @@ function fromMozillaFormat() { | ||||||
|       }) |       }) | ||||||
|       .then(sectionDivs => { |       .then(sectionDivs => { | ||||||
|         sectionDivs.forEach(div => updateLintReportIfEnabled(div.CodeMirror, 1)); |         sectionDivs.forEach(div => updateLintReportIfEnabled(div.CodeMirror, 1)); | ||||||
|         $('.dismiss', popup).onclick(); |         $('.dismiss').dispatchEvent(new Event('click')); | ||||||
|       }) |       }) | ||||||
|       .catch(showError) |       .catch(showError) | ||||||
|       .then(() => lockPageUI(false)); |       .then(() => lockPageUI(false)); | ||||||
|  | @ -483,9 +483,11 @@ function fromMozillaFormat() { | ||||||
| 
 | 
 | ||||||
|   function lockPageUI(locked) { |   function lockPageUI(locked) { | ||||||
|     document.documentElement.style.pointerEvents = locked ? 'none' : ''; |     document.documentElement.style.pointerEvents = locked ? 'none' : ''; | ||||||
|     popup.classList.toggle('ready', locked ? false : !popup.codebox.isBlank()); |     if (popup.codebox) { | ||||||
|     popup.codebox.options.readOnly = locked; |       popup.classList.toggle('ready', locked ? false : !popup.codebox.isBlank()); | ||||||
|     popup.codebox.display.wrapper.style.opacity = locked ? '.5' : ''; |       popup.codebox.options.readOnly = locked; | ||||||
|  |       popup.codebox.display.wrapper.style.opacity = locked ? '.5' : ''; | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function showError(errors) { |   function showError(errors) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user