Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Extension Manager throws TypeError on selecting tab #9466

Closed
yaddran opened this issue Oct 7, 2014 · 7 comments
Closed

Extension Manager throws TypeError on selecting tab #9466

yaddran opened this issue Oct 7, 2014 · 7 comments

Comments

@yaddran
Copy link

yaddran commented Oct 7, 2014

Mac OS X 10.9.5

Release 0.44 experimental build 0.44.0-14876 (release 6d2d33d)
build timestamp: Fri Oct 03 2014 15:05:19 GMT-0700

console log:

Uncaught TypeError: Cannot set property 'scrollPos' of undefined /extensibility/ExtensionManagerDialog.js:310
setActiveTab /extensibility/ExtensionManagerDialog.js:310
(anonymous function) /extensibility/ExtensionManagerDialog.js:319
o.event.dispatch thirdparty.min.js:560
r.handle thirdparty.min.js:560

The code in question:

function setActiveTab($tab) {
    models[_activeTabIndex].scrollPos = $(".modal-body", $dlg).scrollTop(); //line 310
    $tab.tab("show");
    $(".modal-body", $dlg).scrollTop(models[_activeTabIndex].scrollPos || 0);
    $searchClear.click();
}

How to reproduce:

  1. Debug -> Show Developer Tools
  2. File -> Extension Manager
  3. As soon as you see the dialog click on "Installed". You have more time to produce the error if you do this after fresh start of the Brackets but it is always there.
@le717
Copy link
Contributor

le717 commented Oct 7, 2014

Can you empty out the user extensions folder (rename it or something) and see if you can reproduce this? Also, are you running Windows, Mac, etc? I cannot reproduce this myself, also running 0.44.

@marcelgerber
Copy link
Contributor

That's a known issue, filed under #5852

@yaddran
Copy link
Author

yaddran commented Oct 8, 2014

I am on Mac OS X 10.9.5. And clearing the user extensions does not have any influence.

I am not 100% sure about #5852 but looks connected. In my case the extensions are shown anyway and the dialog does not freeze.... but that aside....

I did some debugging and I've traced the problem to the _activeTabIndex, it is undefined at the moment of the click. So IMHO, a simple check if it is undefined and return if it is should do the job (init is still not done). Or maybe setting an initial value...

btw. should I copy this to 5852?

@marcelgerber
Copy link
Contributor

This is now hopefully fixed on master.

@peterflynn peterflynn added this to the Release 1.2 milestone Feb 2, 2015
@peterflynn
Copy link
Member

Closing as fixed

@busykai
Copy link
Contributor

busykai commented Feb 3, 2015

@peterflynn seems like you forgot to close.

@peterflynn
Copy link
Member

Good catch!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants