Hi Hackers,
Just to add, the previous patch was not working because, firefox does not focus a div element if it does not have tabindex(value greater than -1) attribute (somehow it works in chrome).
self.docker.$container referred to div(class-wcDocker) which does not have tabindex attribut. So changed the code to focus its parent div(#container) which have the tabindex="0" attribute.
I have added the comments in code also.