https://bugzilla.wikimedia.org/show_bug.cgi?id=62329
Bug ID: 62329 Summary: VisualEditor: Fix "Uncaught Type: Cannot call method 'attr' of undefined" Product: VisualEditor Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: jforrester+veteambztick...@wikimedia.org Reporter: krinklem...@gmail.com CC: jforres...@wikimedia.org, krinklem...@gmail.com, ryasm...@wikimedia.org Web browser: --- Mobile Platform: --- When VisualEditor deactivates itself after Parsoid fails, this exceptions thrown because the property never got set. ve.init.mw.ViewPageTarget.prototype.deactivate = function(override) { if (..) { if (..) { this.deactivating = true; if (ve.msg('accesskey-save') !== '-' && ve.msg('accesskey-save') !== '') { this.elementsThatHadOurAccessKey.attr('accesskey', ..); ^ ve.init.mw.ViewPageTarget.prototype.setupToolbarButtons = function () { .. if (ve.msg('accesskey-save') !== '-' && ve.msg('accesskey-save') !== '') { this.elementsThatHadOurAccessKey = $( .. ); The code in deactivate() shouldn't be repeating conditions like that as they're no longer semantically relevant, and in this case even incorrect. Instead the top one (which usually runs after setupToolbarButtons) should limit its interest to elementsThatHadOurAccessKey itself which we either set to null or to a jQuery object. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l