autofocus the compose form again on /share (#23094)
This commit is contained in:
		
							parent
							
								
									15e32432b0
								
							
						
					
					
						commit
						bbcbb2dd7f
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -9,7 +9,7 @@ export default class Compose extends React.PureComponent {
 | 
			
		|||
  render () {
 | 
			
		||||
    return (
 | 
			
		||||
      <div>
 | 
			
		||||
        <ComposeFormContainer />
 | 
			
		||||
        <ComposeFormContainer autoFocus />
 | 
			
		||||
        <NotificationsContainer />
 | 
			
		||||
        <ModalContainer />
 | 
			
		||||
        <LoadingBarContainer className='loading-bar' />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -222,8 +222,8 @@ const privacyPreference = (a, b) => {
 | 
			
		|||
const hydrate = (state, hydratedState) => {
 | 
			
		||||
  state = clearAll(state.merge(hydratedState));
 | 
			
		||||
 | 
			
		||||
  if (hydratedState.has('text')) {
 | 
			
		||||
    state = state.set('text', hydratedState.get('text'));
 | 
			
		||||
  if (hydratedState.get('text')) {
 | 
			
		||||
    state = state.set('text', hydratedState.get('text')).set('focusDate', new Date());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return state;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue