Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#2580 closed defect (fixed)

Attempt to perform 2nd search for filter in ABP for Firefox doesn't select the previous one

Reported by: Lain_13 Assignee: greiner
Priority: Unknown Milestone: Adblock-Plus-2.6.12-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: sebastian, trev, mapx, greiner Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29328825/

Description (last modified by greiner)

Environment

Windows 7, Fx 38.0.1, ABP 2.6.9

How to reproduce

  1. Open ABP preferences.
  2. Press Ctrl+F and type something.
  3. Select something outside of the search field. E.g., any rule in the list.
  4. Press Ctrl+F again.

Observed behaviour

Focus moves to the search field but text there isn't selected, so if you start typing without pressing directional keys it won't be replaced with the new text.

Expected behaviour

Focus moves to the search field and becomes selected. If you start typing without pressing directional keys old text should disappear. Same as normal search within current page feature in the Firefox.

What to change

Add finder.getInitialSelection() method to the fake browser instance in "filters-search.js". It's sufficient to call onCurrentSelection(null, true) on each result listener to achieve the expected behavior.

Change History (12)

comment:1 Changed 4 years ago by sebastian

  • Cc sebastian trev added
  • Component changed from Unknown to Adblock-Plus-for-Firefox

comment:2 Changed 4 years ago by sebastian

Reproduced with Firefox (Iceweasel) 38.0.1-5 on Debian Linux and Adblock Plus 2.6.9.1 as well as current devbuild. However, I cannot reproduced it with Firefox 34. So it seems that a change in Firefox is causing this.

Last edited 4 years ago by sebastian (previous) (diff)

comment:3 Changed 4 years ago by mapx

  • Cc mapx added
  • Tester set to Unknown

comment:4 Changed 4 years ago by mapx

I can reproduce the issue in firefox 40 and firefox dev edition 41.0a2 (2015-07-30)

go to custom filters panel
press F2 to edit an existent filter
start typing something ==> the focus moves to search field and from custom filters you'll land into filter subscriptions tab

the same wrong behaviour if:
-copy something from a document for example, go into custom filters tab and paste (using CTRL-V not right click paste) ==> the text will land in the same search field.

Last edited 4 years ago by mapx (previous) (diff)

comment:5 Changed 4 years ago by mapx

  • Cc greiner added

comment:6 Changed 4 years ago by mapx

The issue seems to be reproducible when
"Search for text when I start typing" option is enabled
see #3129

comment:7 Changed 4 years ago by greiner

  • Description modified (diff)

Added "What to change" section to get this ticket to ready state.

comment:8 Changed 4 years ago by trev

  • Ready set

comment:9 Changed 4 years ago by greiner

  • Owner set to greiner

comment:10 Changed 4 years ago by greiner

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:11 Changed 4 years ago by greiner

  • Milestone set to Adblock-Plus-for-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:12 Changed 4 years ago by trev

  • Milestone changed from Adblock-Plus-for-Firefox-next to Adblock-Plus-2.6.12-for-Firefox

Adblock Plus 2.6.12 is being released from branch, this change is part of it.

Note: See TracTickets for help on using tickets.