When clicking reply to a message on CR, we get a "Uncaught ReferenceError: addOnloadHook is not defined"
Noticed by bawolff on IRC
Version: unspecified
Severity: minor
When clicking reply to a message on CR, we get a "Uncaught ReferenceError: addOnloadHook is not defined"
Noticed by bawolff on IRC
Version: unspecified
Severity: minor
/me tried to fix it with http://pastebin.com/9ysSpjgh but was told that is not the proper way to do such things.
Console says source of problem is:
<script type="text/javascript">addOnloadHook(function(){document.getElementById('wpReplyTo14667').focus();});</script>
These scripts should not be inline as mediawiki modules are not available untill the end of the page.
<RoanKattouw> The right way would be to add the following code to codereview.js or its equivalent:
<RoanKattouw> Or wait, we don't have $id on the client side, it'd need to be exported
(before you came in)
Fixed in r83352.
Removed inline scripting and added to core module instead. using the class intead of the $id.