1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 07:55:46 +01:00

Fix finder with iframes. Fix dactyl cleanup on :rehash.

This commit is contained in:
Kris Maglione
2011-01-12 14:15:58 -05:00
parent 0f9a558a3c
commit 0d9f623bea
3 changed files with 13 additions and 11 deletions

View File

@@ -318,7 +318,7 @@ var RangeFind = Class("RangeFind", {
get selectedRange() {
let win = this.content, store = this.content.document.dactylStore;;
if (store)
win = store.focusedFrame || win;
win = store.focusedFrame && store.focusedFrame.get() || win;
let selection = win.getSelection();
return (selection.rangeCount ? selection.getRangeAt(0) : this.ranges[0].range).cloneRange();
@@ -328,6 +328,8 @@ var RangeFind = Class("RangeFind", {
this.range.selection.addRange(range);
this.range.selectionController.scrollSelectionIntoView(
this.range.selectionController.SELECTION_NORMAL, 0, false);
services.focus.focusedWindow = range.startContainer.ownerDocument.defaultView;
},
cancel: function () {