mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 08:47:59 +01:00
reset mode on begin document load, this should fix the annoying -- INSERT -- problem
This commit is contained in:
@@ -775,9 +775,11 @@ vimperator.Events = function () //{{{
|
|||||||
Components.interfaces.nsIWebProgressListener.STATE_IS_WINDOW))
|
Components.interfaces.nsIWebProgressListener.STATE_IS_WINDOW))
|
||||||
{
|
{
|
||||||
// This fires when the load event is initiated
|
// 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)
|
if (flags & Components.interfaces.nsIWebProgressListener.STATE_START)
|
||||||
{
|
{
|
||||||
vimperator.statusline.updateProgress(0);
|
vimperator.statusline.updateProgress(0);
|
||||||
|
vimperator.modes.reset(false);
|
||||||
}
|
}
|
||||||
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
||||||
;// vimperator.statusline.updateUrl();
|
;// vimperator.statusline.updateUrl();
|
||||||
|
|||||||
@@ -215,25 +215,30 @@ vimperator.help = function (section, easter) //{{{
|
|||||||
'\n</div>\n</body>\n</html>';
|
'\n</div>\n</body>\n</html>';
|
||||||
|
|
||||||
var doc = window.content.document;
|
var doc = window.content.document;
|
||||||
|
dump("before open\n");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
doc.open();
|
alert(doc.open());
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
// FIXME: what's this all about then, eh? Works the same for if it's removed. -- djk
|
// dump("catched open\n");
|
||||||
// when the url is "about:" or any other xhtml page the doc is not open
|
// // FIXME: what's this all about then, eh? Works the same for if it's removed. -- djk
|
||||||
// then retry again in 250ms but just once
|
// // when the url is "about:" or any other xhtml page the doc is not open
|
||||||
if (arguments[3] && arguments[3].recursive)
|
// // then retry again in 250ms but just once
|
||||||
return false;
|
// if (arguments[3] && arguments[3].recursive)
|
||||||
|
// return false;
|
||||||
vimperator.open("about:blank");
|
//
|
||||||
setTimeout(function () { vimperator.help(section, false, null, { recursive: true }); }, 250);
|
// vimperator.open("about:blank");
|
||||||
|
// setTimeout(function () { vimperator.help(section, false, null, { recursive: true }); }, 250);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dump("before write\n");
|
||||||
doc.write(fulldoc);
|
doc.write(fulldoc);
|
||||||
|
dump("after write\n");
|
||||||
doc.close();
|
doc.close();
|
||||||
|
dump("closed doc\n");
|
||||||
|
|
||||||
|
|
||||||
// TODO: change to getBoundingClientRect() for FF 3.0
|
// TODO: change to getBoundingClientRect() for FF 3.0
|
||||||
|
|||||||
Reference in New Issue
Block a user