diff options
| author | Stephen Blott | 2015-01-20 11:03:56 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-01-20 11:03:56 +0000 |
| commit | 6f73864899e1c802fd504dec1dcd1644d513d97d (patch) | |
| tree | ced3d2854b369a0c6ef8c1982a40a922efe923cc /lib | |
| parent | 9fa664167b5aaf99069ba9298646a39853eeb067 (diff) | |
| download | vimium-6f73864899e1c802fd504dec1dcd1644d513d97d.tar.bz2 | |
Add contentEditable as criterion for isSelectable.
This allows us to select contentEditable elements in the same way as we
can select other inputs.
Fixes #1437.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dom_utils.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 1d1b67ba..4f36e395 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -140,7 +140,7 @@ DomUtils = isSelectable: (element) -> unselectableTypes = ["button", "checkbox", "color", "file", "hidden", "image", "radio", "reset", "submit"] (element.nodeName.toLowerCase() == "input" && unselectableTypes.indexOf(element.type) == -1) || - element.nodeName.toLowerCase() == "textarea" + element.nodeName.toLowerCase() == "textarea" || element.isContentEditable # Input or text elements are considered focusable and able to receieve their own keyboard events, and will # enter insert mode if focused. Also note that the "contentEditable" attribute can be set on any element |
