From 25b679c83ebf93c8af2e06489fe99b913e20cff8 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Wed, 24 Feb 2016 12:52:38 +0900 Subject: [PATCH] Bug 1250772 - Remove softkb-change observer listener. r=mossop MozReview-Commit-ID: 2PkpjTSVSsM --HG-- extra : rebase_source : 53688c2352da873d8131109c5a9b2eb60f2e16c8 --- toolkit/components/prompts/content/commonDialog.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/toolkit/components/prompts/content/commonDialog.js b/toolkit/components/prompts/content/commonDialog.js index 7c47b9210661..70b373d1f251 100644 --- a/toolkit/components/prompts/content/commonDialog.js +++ b/toolkit/components/prompts/content/commonDialog.js @@ -47,7 +47,6 @@ function commonDialogOnLoad() { // limit the dialog to the screen width document.getElementById("filler").maxWidth = screen.availWidth; - Services.obs.addObserver(softkbObserver, "softkb-change", false); Dialog = new CommonDialog(args, ui); Dialog.onLoad(dialog); @@ -55,19 +54,7 @@ function commonDialogOnLoad() { } function commonDialogOnUnload() { - Services.obs.removeObserver(softkbObserver, "softkb-change"); // Convert args back into property bag for (let propName in args) propBag.setProperty(propName, args[propName]); } - -function softkbObserver(subject, topic, data) { - let rect = JSON.parse(data); - if (rect) { - let height = rect.bottom - rect.top; - let width = rect.right - rect.left; - let top = (rect.top + (height - window.innerHeight) / 2); - let left = (rect.left + (width - window.innerWidth) / 2); - window.moveTo(left, top); - } -}