diff options
| author | Jez Ng | 2012-01-10 00:31:52 +0800 |
|---|---|---|
| committer | Jez Ng | 2012-01-10 00:37:56 +0800 |
| commit | a73f92604fca5380609f271685266cadf376ccbc (patch) | |
| tree | 2804155f8ae03bbfb38dee97872d4ba9ffb6246d /linkHints.js | |
| parent | f6de023d964f2b4f8739e96361d542eb71d49dec (diff) | |
| download | vimium-a73f92604fca5380609f271685266cadf376ccbc.tar.bz2 | |
Detect contentEditable elements for hinting / input focus.
Diffstat (limited to 'linkHints.js')
| -rw-r--r-- | linkHints.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js index d37d2d7c..170dacb8 100644 --- a/linkHints.js +++ b/linkHints.js @@ -39,9 +39,11 @@ var linkHints = { /* * Generate an XPath describing what a clickable element is. * The final expression will be something like "//button | //xhtml:button | ..." + * We use translate() instead of lower-case() because Chrome only supports XPath 1.0. */ clickableElementsXPath: utils.makeXPath(["a", "area[@href]", "textarea", "button", "select","input[not(@type='hidden')]", - "*[@onclick or @tabindex or @role='link' or @role='button']"]), + "*[@onclick or @tabindex or @role='link' or @role='button' or " + + "@contenteditable='' or translate(@contenteditable, 'TRUE', 'true')='true']"]), // We need this as a top-level function because our command system doesn't yet support arguments. activateModeToOpenInNewTab: function() { this.activateMode(true, false, false); }, |
