mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 00:02:28 +01:00
Look for scrollable elements in the focused frame first.
--HG-- extra : rebase_source : dffe9f302407a2b49158761e1e9fa0c2e2329caf
This commit is contained in:
@@ -1161,8 +1161,8 @@ const Buffer = Module("buffer", {
|
||||
return elem;
|
||||
}
|
||||
|
||||
if (window.content.getSelection().rangeCount)
|
||||
var elem = find(window.content.getSelection().getRangeAt(0).startContainer);
|
||||
if (buffer.focusedFrame.getSelection().rangeCount)
|
||||
var elem = find(buffer.focusedFrame.getSelection().getRangeAt(0).startContainer);
|
||||
if (!(elem instanceof Element)) {
|
||||
let doc = Buffer.findScrollableWindow().document;
|
||||
elem = find(doc.body || doc.getElementsByTagName("body")[0] ||
|
||||
|
||||
Reference in New Issue
Block a user