| Age | Commit message (Collapse) | Author |
|
This affects filtered hints only.
If a hint is triggered because the user typed the link text, then:
- highlight the link
- but wait until the user types `Enter` before activating the link.
|
|
|
|
|
|
When we `simulateSelect` an input and the selection is at the start, we
move it to the end. This works well for single-line inputs. However,
the UX is *bad* for multiline inputs (such as text areas), and doubly so
if the end of the input happens to be out of the viewport.
This commit simply disables the repositioning of the selection within
text areas.
|
|
|
|
On a XML view page, createElement will create an "Element" object
Otherwise, createElement('div') will get an object
: HTMLDivElement >> HTMLElement >> Element
|
|
oh my god
|
|
|
|
|
|
|
|
This implements @gdh1995's idea from #1796.
|
|
This fixes #1770.
|
|
|
|
If an element with style="display: inline; font-size: 0px;" surrounds
another element with style="display: inline; font-size: apx;", where a
is non-zero, then the inner element and its contents will be visible.
However, the outer element will register height=0 in its clientRects,
which previously caused us to reject these elements. This changes the
behaviour to handle this case correctly.
|
|
This requires passing of an extra truthy argument in order to access the
(generally) unexpected behaviour of sometimes returning the rects of
child elements. All locations in the code that *actually* wanted this
behaviour have been updated to continue using it.
Also add a comment about the unexpected behaviour in the function
description.
|
|
Elements with css `display: none;` never have client rects.
|
|
|
|
|
|
Mainly fix the indentation on comments. Also tweak wording a bid.
|
|
|
|
This only effects link hints with "Use the link's name and numbers for
link-hint filtering" enabled.
We have been matching the *entire text content* of each link-hint
element.
With two (or more) hints, and with one of the elements a descendent of
the other, we have been using the entire text content of the outer node
(which includes the text content of the inner node). This leads to odd
situations where the inner element cannot be selected just by typing its
text, because its text is a substring of the outer element's text.
For example, on Google calendar, the "Today" button shows up as two
hints, one inside the other. Typing "today" never disambiguates the
hint. You always have to hit enter.
There's another nasty example on feedly, where an outer container is
clickable, but its text contains all of the (many) texts of the (many)
contained links. So the hint always has to be selected manually.
Here, when generating the text for an element, we exclude the texts from
any descendent node which has already been considered.
|
|
This restores behaviour to how it was at commit
7cedc5d2481f61f4b0d1cbf99fbd203bb5c68b54.
|
|
|
|
|
|
|
|
These elements throw an error on access, meaning that we can't do an
existence check.
|
|
- convert getCaretCoordinates from JS to CS
- handle x axis in scrollIntoView
- better comments throughout.
|
|
Also, change how vim's "w" is implemented.
Also some code-review/cleanup.
Better dd and yy for gmail.
|
|
|
|
- implement "i", "a".
- fix "w" for edit mode.
- try out "e" for enter edit mode.
- initial implementation "o", "O"
- Suppress backspace and delete.
- Scroll in text areas.
|
|
This allows us to select contentEditable elements in the same way as we
can select other inputs.
Fixes #1437.
|
|
There's no point in focusing element if it's already active.
Also, we leave the caret in place, not just a range selection.
isSelected makes the wrong decision if the user has placed the caret at
the start of element. We cannot distinguish that case from the user
having made no selection. Nevertheless, this is substantially better
than the existing UX, which *always* moves the caret to the end.
|
|
|
|
|
|
Fixes #1430.
|
|
|
|
A modal-browsing framework
|
|
|
|
Uses document.readyState for all onDOMContentLoaded dependent functions.
This should fix the same race condition as #1426 for all cases.
|
|
Fixes #1426.
|
|
|
|
- when the selection is contentEditable
- in PostFindMode
Restricted to printable characters.
|
|
- Set Mode.debug to true to see mode activation/deactivation on the
console.
- Use Mode.log() to see a list of currently-active modes.
- Use handlerStack.debugOn() to enable debugging of the handler stack.
|
|
Slightly more significant:
Move several utilities to dome_utils.
|
|
Also fix post insert.
|
|
- Add StateMode.
- PasskeysMode is a StateMode.
- BadgeUpdateMode is a StateMode.
- Improve badge handling.
- Add push method to Mode.
- Document how modes work.
- Cache badge on background page to reduce the number of updates.
- Remove badge restriction on document.body?.tagName.toLowerCase() == "frameset".
- Add ExitOnEscape mode, use it for ConstrainedMode and FindMode.
- Move PostFindMode to its own file.
|
|
|
|
|
|
This is primarily to deal with our calculated rects being too small for
the `<area shape="poly">` on
http://www.mapsofindia.com/worldmap/clickable-world-map.html
|
|
|