mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 14:27:59 +01:00
Try not to reset dactylFocusAllowed on hash tag change. Closes issue #237.
This commit is contained in:
@@ -288,9 +288,17 @@ var Buffer = Module("buffer", {
|
|||||||
onLocationChange: function onLocationChange(webProgress, request, uri) {
|
onLocationChange: function onLocationChange(webProgress, request, uri) {
|
||||||
onLocationChange.superapply(this, arguments);
|
onLocationChange.superapply(this, arguments);
|
||||||
statusline.updateUrl();
|
statusline.updateUrl();
|
||||||
statusline.updateProgress(webProgress.DOMWindow || content);
|
if (webProgress.DOMWindow && uri) {
|
||||||
for (let frame in values(buffer.allFrames(webProgress.DOMWindow || content)))
|
statusline.updateProgress(webProgress.DOMWindow);
|
||||||
|
|
||||||
|
let oldURI = webProgress.document.dactylURI;
|
||||||
|
if (webProgress.document.dactylLoadIdx === webProgress.loadedTransIndex
|
||||||
|
|| !oldURI || uri.spec.replace(/#.*/, "") !== oldURI.replace(/#.*/, ""))
|
||||||
|
for (let frame in values(buffer.allFrames(webProgress.DOMWindow)))
|
||||||
frame.document.dactylFocusAllowed = false;
|
frame.document.dactylFocusAllowed = false;
|
||||||
|
webProgress.document.dactylURI = uri.spec;
|
||||||
|
webProgress.document.dactylLoadIdx = webProgress.loadedTransIndex;
|
||||||
|
}
|
||||||
|
|
||||||
// Workaround for bugs 591425 and 606877, dactyl bug #81
|
// Workaround for bugs 591425 and 606877, dactyl bug #81
|
||||||
let collapse = uri && uri.scheme === "dactyl" && webProgress.isLoadingDocument;
|
let collapse = uri && uri.scheme === "dactyl" && webProgress.isLoadingDocument;
|
||||||
|
|||||||
@@ -996,6 +996,7 @@ var Events = Module("events", {
|
|||||||
onMouseDown: function onMouseDown(event) {
|
onMouseDown: function onMouseDown(event) {
|
||||||
let elem = event.target;
|
let elem = event.target;
|
||||||
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
|
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
|
||||||
|
|
||||||
for (; win; win = win != win.parent && win.parent)
|
for (; win; win = win != win.parent && win.parent)
|
||||||
win.document.dactylFocusAllowed = true;
|
win.document.dactylFocusAllowed = true;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -796,7 +796,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
* @returns {nsIURI}
|
* @returns {nsIURI}
|
||||||
*/
|
*/
|
||||||
// FIXME: createURI needed too?
|
// FIXME: createURI needed too?
|
||||||
newURI: function (uri, charset, base) services.io.newURI(uri.replace(/.* -> /, ""), charset, base),
|
newURI: function (uri, charset, base) services.io.newURI(String.replace(uri, /.* -> /, ""), charset, base),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pretty print a JavaScript object. Use HTML markup to color certain items
|
* Pretty print a JavaScript object. Use HTML markup to color certain items
|
||||||
|
|||||||
Reference in New Issue
Block a user