1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 09:27:58 +01:00

Set continue=false before hiding hints. Closes issue #85.

This commit is contained in:
Kris Maglione
2010-10-14 13:36:56 -04:00
parent eee5f6e71b
commit fbb70c7093

View File

@@ -94,9 +94,8 @@ const Hints = Module("hints", {
this._activeTimeout = null; this._activeTimeout = null;
}, },
__reset: function __reset() { __reset: function __reset() {
if (!this._usedTabKey) { if (!this._usedTabKey)
this._hintNumber = 0; this._hintNumber = 0;
}
if (this._continue && this._validHints.length <= 1) { if (this._continue && this._validHints.length <= 1) {
this._hintString = ""; this._hintString = "";
commandline.widgets.command = this._hintString; commandline.widgets.command = this._hintString;
@@ -378,6 +377,7 @@ const Hints = Module("hints", {
* Display the hints in pageHints that are still valid. * Display the hints in pageHints that are still valid.
*/ */
_showHints: function _showHints() { _showHints: function _showHints() {
util.dumpStack();
let hintnum = 1; let hintnum = 1;
let validHint = this._hintMatcher(this._hintString.toLowerCase()); let validHint = this._hintMatcher(this._hintString.toLowerCase());
let activeHint = this._hintNumber || 1; let activeHint = this._hintNumber || 1;
@@ -451,6 +451,7 @@ const Hints = Module("hints", {
* hint disappears. * hint disappears.
*/ */
_removeHints: function _removeHints(timeout, slight) { _removeHints: function _removeHints(timeout, slight) {
util.dump("_removeHints", timeout, slight);
for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) {
for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc)) for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc))
elem.parentNode.removeChild(elem); elem.parentNode.removeChild(elem);
@@ -856,6 +857,7 @@ const Hints = Module("hints", {
* Cancel all hinting. * Cancel all hinting.
*/ */
hide: function hide() { hide: function hide() {
this._continue = false;
if (this._top) if (this._top)
this._top.removeEventListener("resize", this._resizeTimer.closure.tell, true); this._top.removeEventListener("resize", this._resizeTimer.closure.tell, true);
this._top = null; this._top = null;