diff options
| -rw-r--r-- | linkHints.js | 4 | ||||
| -rw-r--r-- | vimiumFrontend.js | 2 |
2 files changed, 4 insertions, 2 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); }, diff --git a/vimiumFrontend.js b/vimiumFrontend.js index a9dc1d37..8fa72509 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -32,7 +32,7 @@ var textInputXPath = (function() { var textInputTypes = ["text", "search", "email", "url", "number"]; var inputElements = ["input[" + textInputTypes.map(function (type) { return '@type="' + type + '"'; }).join(" or ") + "or not(@type)]", - "textarea"]; + "textarea", "*[@contenteditable='' or translate(@contenteditable, 'TRUE', 'true')='true']"]; return utils.makeXPath(inputElements); })(); |
