Maintain focus for inner-elements in a11y component
This commit is contained in:
		
							parent
							
								
									1d4d17eb94
								
							
						
					
					
						commit
						acebd434c1
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		|  | @ -10,7 +10,9 @@ export default class SortableGroupAccessibleComponent extends Component { | |||
|   handleFocus() { this.groupHasFocus = true; } | ||||
| 
 | ||||
|   @action | ||||
|   handleBlur() { this.groupHasFocus = false; } | ||||
|   handleBlur({ target, relatedTarget }) { | ||||
|     if (!target.contains(relatedTarget)) this.groupHasFocus = false; | ||||
|   } | ||||
| 
 | ||||
|   @action | ||||
|   handleArrowUp() { | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| <div | ||||
|   class='relative border border-gray-400 | ||||
|     {{if (and @groupHasFocus (eq @currentIndex @selectedIndex)) 'border-orange-400'}}'> | ||||
|   {{if (and @groupHasFocus (eq @currentIndex @selectedIndex)) 'border-orange-400'}}'> | ||||
|   {{#if (and @groupHasFocus (eq @currentIndex @selectedIndex))}} | ||||
|     <button | ||||
|       role="button" | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ava Wroten
						Ava Wroten