From 7ecbae765d8718d7ece0ba78cbef7542c115036f Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Thu, 22 Feb 2018 16:42:07 -0500 Subject: [PATCH 1/2] Use baseNode over anchorNode in follow-selected baseNode isn't documented anywhere that I can find, but it seems to be getting us what anchorNode used to get us. --- qutebrowser/javascript/webelem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/javascript/webelem.js b/qutebrowser/javascript/webelem.js index d635de412..eb6ce2790 100644 --- a/qutebrowser/javascript/webelem.js +++ b/qutebrowser/javascript/webelem.js @@ -331,13 +331,13 @@ window._qutebrowser.webelem = (function() { // Function for returning a selection to python (so we can click it) funcs.find_selected_link = () => { - const elem = window.getSelection().anchorNode; + const elem = window.getSelection().baseNode; if (elem) { return serialize_elem(elem.parentNode); } const serialized_frame_elem = run_frames((frame) => { - const node = frame.window.getSelection().anchorNode; + const node = frame.window.getSelection().baseNode; if (node) { return serialize_elem(node.parentNode, frame); } From 820ffed07f11cbfe9966261a62e71236d41595d1 Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Fri, 23 Feb 2018 18:06:57 -0500 Subject: [PATCH 2/2] Remove test blacklists for 5.10 --- tests/end2end/features/search.feature | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/end2end/features/search.feature b/tests/end2end/features/search.feature index ae3f07999..458b86d60 100644 --- a/tests/end2end/features/search.feature +++ b/tests/end2end/features/search.feature @@ -225,15 +225,11 @@ Feature: Searching on a page Then the following tabs should be open: - data/search.html (active) - # Following a link selected via JS doesn't work in Qt 5.10 anymore. - @qt!=5.10 Scenario: Follow a manually selected link When I run :jseval --file (testdata)/search_select.js And I run :follow-selected Then data/hello.txt should be loaded - # Following a link selected via JS doesn't work in Qt 5.10 anymore. - @qt!=5.10 Scenario: Follow a manually selected link in a new tab When I run :window-only And I run :jseval --file (testdata)/search_select.js