From a3940856015eee9dde6fea115c75500806b2549e 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 --- 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 7c47b921066..70b373d1f25 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); - } -}