1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 13:27:58 +01:00

Fix pressing <Space> in content-editable windows. Closes issue #not-in-the-tracker-for-some-reason.

This commit is contained in:
Kris Maglione
2011-02-12 12:15:02 -05:00
parent e7529166df
commit 127ed4cfc2
5 changed files with 17 additions and 11 deletions

View File

@@ -221,7 +221,9 @@ var Buffer = Module("buffer", {
*/
get lastInputField() {
let field = this.localStore.lastInputField && this.localStore.lastInputField.get();
return field && field.ownerDocument == field.ownerDocument.defaultView.document ? field : null;
let doc = field && field.ownerDocument;
let win = doc && doc.defaultView;
return win && doc === win.document ? field : null;
},
set lastInputField(value) { this.localStore.lastInputField = value && Cu.getWeakReference(value); },