You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Fix handling of the platform onKeyDown
Only call it if the event hasn't been handled yet.
This commit is contained in:
		@@ -485,9 +485,10 @@ class LoggedInView extends React.Component<IProps, IState> {
 | 
				
			|||||||
                    unread: true,
 | 
					                    unread: true,
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                // if we do not have a handler for it, pass it to the platform which might
 | 
				
			||||||
 | 
					                handled = PlatformPeg.get().onKeyDown(ev);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        // if we do not have a handler for it, pass it to the platform which might
 | 
					 | 
				
			||||||
        handled = PlatformPeg.get().onKeyDown(ev);
 | 
					 | 
				
			||||||
        if (handled) {
 | 
					        if (handled) {
 | 
				
			||||||
            ev.stopPropagation();
 | 
					            ev.stopPropagation();
 | 
				
			||||||
            ev.preventDefault();
 | 
					            ev.preventDefault();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user