-
Robert Knight authored
Listen for mouseup/mousedown events on the document body rather than document itself, so that we can still capture them if an event listener on `document.body` or `document.documentElement` stops propagation of the event. The VitalSource integration does this for example to prevent VitalSource's own selection UI appearing, but ordinary web pages could do something similar. In VitalSource books, this change makes the adder behave the same as it does in HTML and PDF documents where, when making a selection with the mouse, the adder only appears when the mouse is released so it doesn't get in the way during the selection. While updating the tests for this change, they were converted to use a real document, as the complexity of mocking the relevant parts of the DOM document interface accurately is now too high.
e70287cf
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
html-metadata-test.js | ||
html-side-by-side-test.js | ||
html-test.js | ||
image-text-layer-test.js | ||
index-test.js | ||
pdf-metadata-test.js | ||
pdf-test.js | ||
vitalsource-test.js |