mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-18 17:03:32 +01:00
fixed focus stuff for muttator again, we just can't avoid it that we end up in
-- MESSAGE -- mode when we click a link. Press <esc> to get back to normal mode.
This commit is contained in:
@@ -780,24 +780,16 @@ vimperator.Events = function () //{{{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vimperator.config.name == "Muttator")// &&
|
if (vimperator.config.name == "Muttator")
|
||||||
//win && win.document && win.document instanceof HTMLDocument)
|
|
||||||
{
|
{
|
||||||
// we switch to -- MESSAGE -- mode for muttator, when an HTML document
|
// we switch to -- MESSAGE -- mode for muttator, when an HTML document gets focus
|
||||||
// is selected but not when we just click a link
|
if ((win && win.document && win.document instanceof HTMLDocument) ||
|
||||||
if (win && win.document && win.document instanceof HTMLDocument && (!elem || vimperator.mode == vimperator.modes.MESSAGE))
|
elem instanceof HTMLAnchorElement)
|
||||||
{
|
{
|
||||||
if (vimperator.mode != vimperator.modes.MESSAGE)
|
if (vimperator.mode != vimperator.modes.MESSAGE)
|
||||||
vimperator.mode = vimperator.modes.MESSAGE;
|
vimperator.mode = vimperator.modes.MESSAGE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (elem instanceof HTMLAnchorElement && vimperator.mode != vimperator.modes.MESSAGE)
|
|
||||||
{
|
|
||||||
vimperator.focusContent();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
;//dump("hu\n")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vimperator.mode == vimperator.modes.INSERT ||
|
if (vimperator.mode == vimperator.modes.INSERT ||
|
||||||
|
|||||||
Reference in New Issue
Block a user