Internal ticket: https://app.asana.com/0/488551667048375/1108574295820133
This problem is related to autocomplete feature.
Steps to reproduce shows an example with bangs, but it happens for all kind of characters.
Steps to reproduce the problem
! in the address bar! in the address bar againExpected behavior
Additional notes
! + any sign (e.g. !a) and then remove additional sign (a in the case of example), then suggestions appear!, then suggestions appearx sign in the address bar or by pressing back button when keyboard is open) - in all cases behavior is the sameQuestion
SpecialUrlDetector.kt and I searched for keywords like "bang" and "bangs" in the GitHub repo, but I couldn't find anything.I can't reproduce the issue. What device are you using?
I always see the last page in address bar, when I clear it and put "!" there are suggestions appearing always. Clear and put "!" again doesn't help.
That's strange! I can replicate this; thanks for the detailed steps.
I wonder if it's due to RxJava filtering out results due to ! having been entered twice... The second time (after deleting and entering again) might be filtered out as not distinct.
We'll look into this, thanks.
Can you tell me, where in the code can I find implementation of the bangs?
There is no client-side code for the bangs; instead those are being returned from the autocomplete API.
The RxJava chain that is likely responsible is in here, in configureAutoComplete function
Just wrote the same, but wasn't sure. You can see URL changing in the address bar during bangs request.
[Usual search doesn't show DDG URL in the address bar. Probably this "redirect" shouldn't be shown as well]
It's not even unique to bangs; any search term will do in between deleting the characters and retyping.
Seems to maybe only happen on the blank tab page though.
@CDRussell thanks for the reply and pointing the place in the source code. Maybe I'll try to fix it in my free time when I find the root cause of this issue.
I had a look at this to make sure the Rx thinking held up; it seems like the problem is related but is before it even gets to the Rx chain.
There are redundant checks that the query has changed performed, and one of these checks is erroneously preventing the empty query from getting through, which causes the oddity described.
I should have a small fix available for this soon; just checking it really is redundant and not needed for anything.
PR created for this https://github.com/duckduckgo/Android/pull/433
Thanks again for reporting this, and all the info provided. This should be fixed in the next release.
Let me know if it's still causing problems.