1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 02:57:59 +01:00

reset mode on begin document load, this should fix the annoying -- INSERT -- problem

This commit is contained in:
Martin Stubenschrott
2007-12-12 04:23:42 +00:00
parent e7aa6020a8
commit b26634f34a
2 changed files with 16 additions and 9 deletions

View File

@@ -775,9 +775,11 @@ vimperator.Events = function () //{{{
Components.interfaces.nsIWebProgressListener.STATE_IS_WINDOW))
{
// This fires when the load event is initiated
// only thrown for the current tab, not when another tab changes
if (flags & Components.interfaces.nsIWebProgressListener.STATE_START)
{
vimperator.statusline.updateProgress(0);
vimperator.modes.reset(false);
}
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
;// vimperator.statusline.updateUrl();

View File

@@ -215,25 +215,30 @@ vimperator.help = function (section, easter) //{{{
'\n</div>\n</body>\n</html>';
var doc = window.content.document;
dump("before open\n");
try
{
doc.open();
alert(doc.open());
}
catch (e)
{
// FIXME: what's this all about then, eh? Works the same for if it's removed. -- djk
// when the url is "about:" or any other xhtml page the doc is not open
// then retry again in 250ms but just once
if (arguments[3] && arguments[3].recursive)
return false;
vimperator.open("about:blank");
setTimeout(function () { vimperator.help(section, false, null, { recursive: true }); }, 250);
// dump("catched open\n");
// // FIXME: what's this all about then, eh? Works the same for if it's removed. -- djk
// // when the url is "about:" or any other xhtml page the doc is not open
// // then retry again in 250ms but just once
// if (arguments[3] && arguments[3].recursive)
// return false;
//
// vimperator.open("about:blank");
// setTimeout(function () { vimperator.help(section, false, null, { recursive: true }); }, 250);
return;
}
dump("before write\n");
doc.write(fulldoc);
dump("after write\n");
doc.close();
dump("closed doc\n");
// TODO: change to getBoundingClientRect() for FF 3.0