aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dom_utils.coffee
AgeCommit message (Collapse)Author
2014-12-14Merge branch 'add-html5-input-types' of https://github.com/mrmr1993/vimium ↵Stephen Blott
into mrmr1993-add-html5-input-types
2014-12-14List HTML5 date types that should use simulateSelectmrmr1993
2014-12-14Update a comment about the changed nature of isSelectablemrmr1993
2014-11-23Change DomUtils.makeXPath to loop as an array rather than an objectmrmr1993
This fixes the tests, which were broken by makeXPath trying to recurse over Arrays with an augmented prototype.
2014-11-05Add support for selecting HTML5 inputs, change criterion to a blacklistmrmr1993
This is designed to address several issues: * `<input type="range" />` elements don't respond well to the simulated click; they always reset their value to the minimum. * The lack of `mouseup` event from the simulated click makes `<input type="range />` elements slide when the mouse is moved. * HTML5 adds a large number of text-based `<input>`s that should be focused like the `type="text"` case, for consistency. (Using a blacklist halves the number of types we have to list.) * An `<input>` with a `type` the browser doesn't support is rendered as a `type="text"`, so a blacklist ensures that the focusing action is consistent on all elements behaving as `type="text"`.
2014-11-02Centralize handling of event propagation.Stephen Blott
2014-11-02Force our key event handlers to have the highest possible prioritymrmr1993
* The `window` object receives key events before the `document` object, and so any event listeners on `window` get priority. This commit switches from binding `keydown`, `keypress`, `keyup` on `document` to on `window`. * We were using `event.stopPropagation()` to prevent other event listeners from firing if we had handled an event. This stopped the event from propagating to other elements/objects and triggering their event listeners, but didn't block event listeners registered on the same object as ours. Switching to `event.stopImmediatePropagation()` ensures that our event listener is the last to run for the event. Fixing these issues allows Vimium to regain control over key events in Google Groups (eg. the [vimium-dev group](https://groups.google.com/forum/vimium-dev)).
2014-04-23Remove additional unnecessary checksmrmr1993
2014-04-23Add openlinks in foreground mode and fix #1035mrmr1993
2013-10-28Fixed detection of links which are only partially inside the viewportStanley Shyiko
2012-10-29More tests, because I like having coverage.Jez Ng
2012-10-24Use insertCSS() API instead of manually created style element.Jez Ng
For some reason addCssToPage seemed to break on Chrome 24. Closes #676.
2012-10-20Refactor handlerStack. Closes #657.Jez Ng
Previously, handlerStack was designed only for removal of the handler right at the top of the stack. However, some handlers sought to remove themselves when they were not at the top of the stack, creating confusion. The new handlerStack ensures that such removal can always be done safely.
2012-09-09More lint fixes.Jez Ng
2012-09-04Style fixes.Jez Ng
Errors were detected using coffeelint.
2012-08-26Fix rectangle flashing on pages with a relative-positioned <body>.Jez Ng
2012-08-20More refactoring-cleanup.Jez Ng
* vimium_frontend now has a pretty decent set of exports * Generic linkHints code has been moved to DomUtils, so future features can reuse the code.
2012-08-19Use more idiomatic CS.Jez Ng
2012-08-04Refactor link hints to be more functional.Jez Ng
This paves the way for the hints code to be reused in other modes.
2012-06-12port dom_utils.js to coffeescriptPhil Crosby