Bug 1007562 - Fix javascript errors
Merge pull request #19157 from crh0716/1007562

Bug 1007562 - Fix javascript errors, r=evelyn