sindresorhus/refined-github

'Attach files' button not working / throwing `Cannot read property 'click' of null` #2774

jennifer-shehane posted onGitHub

When clicking the 'Attach Files' button, the file dialog does not open. An error is logged to DevTools console:

content.js:8271 Uncaught TypeError: Cannot read property 'click' of null
    at HTMLDocument.triggerUpload (content.js:8271)
    at HTMLDocument.listenerFn (content.js:369)

Stack trace goes to this line of code in content.js

<img width="595" alt="Screen Shot 2020-02-12 at 3 49 09 PM" src="https://user-images.githubusercontent.com/1271364/74320817-ad47c980-4daf-11ea-97e4-cc22b1c05a99.png">

I can't use the button in this very issue, so I guess this issue url is a good url. 😝

Gif of behavior

When turning off Refined GitHub, the 'attach files' works from plain GitHub.

It's a bit weird because I only noticed this in the last 24 hours, maybe my extensions didn't update until today? Maybe GitHub changed something in their UI. I'm not sure. Let me know if you need anymore information.


Workaround

Disable the 'minimize upload bar' feature from the 'Extension Options' within the 'Details' of the Extension.

<img width="577" alt="Screen Shot 2020-02-13 at 12 06 52 PM" src="https://user-images.githubusercontent.com/1271364/74404644-82b24b00-4e59-11ea-8829-3e9eb81f2f5d.png">


Probably today GitHub changed the class name so we need to fix it. It should be an easy fix.

You can just drag and drop files into the comment area until then.

posted by fregante about 5 years ago

You can access the settings like for every other extension: right click on the icon, click Options

Or chrome://extensions/ -> Details -> Extension options

posted by fregante about 5 years ago

@fregante Thanks! Yeah, didn't see the little arrow to open that link. Thanks for the fast fix also.

posted by jennifer-shehane about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests