Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught TypeError: Cannot read property 'rememberFocus' of null #1490

Closed

Description

@drguthals

[Enter steps to reproduce:]

  1. Made Changes
  2. Staged Commits
  3. Added @smashwilson as a co-author (wasn't auto-filled)
  4. Clicked "Add Co-Author"
  5. Error Appears
  6. Co-author still listed there
  7. Committed changes
  8. Co-author still populating the co-author space
  9. Didn't actually commit - but that might be due to the auth (https://github.com/github/atom.io/pull/1249)

Atom: 1.28.0-beta1 x64
Electron: 2.0.1
OS: Mac OS X 10.13.4
Thrown From: github package 0.15.2

Stack Trace

Uncaught TypeError: Cannot read property 'rememberFocus' of null

At /Users/sarahguthals/.atom/packages/github/lib/controllers/git-tab-controller.js:315

TypeError: Cannot read property 'rememberFocus' of null
    at GitTabController.rememberLastFocus (/packages/github/lib/controllers/git-tab-controller.js:315:35)
    at AutosizeInput.focus (/packages/github/node_modules/react-input-autosize/lib/AutosizeInput.js:173:15)
    at Select.focus (/packages/github/node_modules/react-select/lib/Select.js:278:15)
    at refCoAuthorSelect.map.c (/packages/github/lib/views/commit-view.js:352:41)
    at RefHolder.map (/packages/github/lib/models/ref-holder.js:70:14)
    at CommitView.setState (/packages/github/lib/views/commit-view.js:352:30)
    at Rf (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:143:60)
    at Sf (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:144:304)
    at Xh (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:219:152)
    at Rh (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:211:414)
    at Uh (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:210:278)
    at Sh (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:210:113)
    at interactiveUpdates (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:225:398)
    at Jd (/packages/github/node_modules/react-dom/cjs/react-dom.production.min.js:89:113)

Commands

     -0:33.3.0 core:select-all (input.)
     -0:30.7.0 github:co-author:enter (input.)
     -0:29.6.0 core:focus-next (input.input-text.github-CoAuthorForm-name)

Non-Core Packages

teletype 0.13.3 

Activity

  1. smashwilson commented on Jun 1, 2018

    @smashwilson
    Contributor

    Should be fixed ⚡

  2. as-cii commented on Jun 6, 2018

    @as-cii
    Contributor

    I just hit this after updating atom from master earlier this morning. This is the stack trace in case it's helpful:

    At /Applications/Atom.app/Contents/Resources/app/node_modules/github/lib/controllers/git-tab-controller.js:302
    
    TypeError: Cannot read property 'rememberFocus' of null
        at GitTabController.rememberLastFocus (/Applications/Atom.app/Contents/Resources/app/node_modules/github/lib/controllers/git-tab-controller.js:302:41)
        at AutosizeInput.focus (/Applications/Atom.app/Contents/Resources/app/node_modules/react-input-autosize/lib/AutosizeInput.js:173:21)
        at Select.focus (/Applications/Atom.app/Contents/Resources/app/node_modules/react-select/lib/Select.js:278:21)
        at refCoAuthorSelect.map.c (/Applications/Atom.app/Contents/Resources/app/node_modules/github/lib/views/commit-view.js:368:47)
        at RefHolder.map (/Applications/Atom.app/Contents/Resources/app/node_modules/github/lib/models/ref-holder.js:87:20)
        at CommitView.setState (/Applications/Atom.app/Contents/Resources/app/node_modules/github/lib/views/commit-view.js:368:36)
        at Rf (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:143:66)
        at Sf (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:144:310)
        at Xh (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:219:158)
        at Rh (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:211:425)
        at Uh (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:210:284)
        at Sh (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:210:119)
        at interactiveUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:225:404)
        at Jd (/Applications/Atom.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.production.min.js:89:119)
    

    Atom: 1.29.0-dev-463a7f4 x64
    Electron: 2.0.1
    OS: Mac OS X 10.13.4
    Thrown From: Atom Core

  3. smashwilson commented on Jun 6, 2018

    @smashwilson
    Contributor

    Well nuts 😆 Looks like we have a few more places to guard against empty refs.

    Thanks for the report 👍

  4. annthurium commented on Jun 13, 2018

    @annthurium

    I just also ran into this when clicking "commit" when there were no staged changes.

  5. self-assigned this
    on Aug 8, 2018
  6. smashwilson commented on Aug 9, 2018

    @smashwilson
    Contributor

    I did a pretty thorough pass-through of the focus management code in #1631, so this one should be gone for good this time 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions