Looks like setting mozNfc.onpeerready to null is preventing the window to be shrank, let's add some comments about the null value to the mozNfc.onpeerready.