mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1250772 - Remove softkb-change observer listener. r=mossop
MozReview-Commit-ID: 2PkpjTSVSsM
This commit is contained in:
parent
ca4f352f10
commit
a394085601
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user