Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enter key input listener is too global #140

Open
fritzmg opened this issue Jul 9, 2019 · 4 comments
Open

enter key input listener is too global #140

fritzmg opened this issue Jul 9, 2019 · 4 comments

Comments

@fritzmg
Copy link
Contributor

fritzmg commented Jul 9, 2019

  • FACT-Finder-Web-Components Magento2-Module version (see composer.json): 1.1.2
  • Magento edition and version: 2.2.8
  • PHP version: 7.1.25

Expected behavior

When entering an address in the address bar of the browser and hitting 'enter', I expect that address to be opened by the browser. When hitting Ctrl+Shift+Del (to delete the browser cache) and then hit 'enter', I expect no reaction from the web application.

Actual behavior

Whenever you hit the enter key, a global key listener will either execute a search or a redirect. So when you are already in the shop, but not on the FACT-Finder/result page and you enter a new address in the address bar of the browser - the browser will actually redirect you to the FACT-Finder/result page upon hitting enter, instead of opening the newly entered address.

Similarly, if you clear your browser's cache with Ctrl+Shift+Del and then Enter, FACT-Finder reacts to that as well.

Steps to reproduce

  1. Go to any page in your Magento store.
  2. Enter a new address in the address bar of your browser.
  3. Hit enter.

The browser will open the FACT-Finder/result page instead of the newly entered address.

It's very irritating ;)

@a-laurowski
Copy link
Contributor

Hey @fritzmg
I was trying to reproduce this behaviour but unfortunately I wasn't be able to.
It would be helpful If You provide more info like:

  • used browser
  • used browser plugins (if have installed any)
  • ff-communication parameters (excluding url and channel)

I did the following steps (using Chrome, Firefox and Edge):

1.

  • Opening page on home page, tried also with customer register page
  • Enter category page by manually enter the address, Tried also with checkout/cart page, cms pages

2.

  • Opening home page
  • Deleted browser cache
  • Enter an page url manually

In both cases, page was loaded correctly.
Module for sure doesn't add any key listener, Web Components, from what I see in bundle.js, does add one, so it may means that this is a WebComponents related issue

@fritzmg
Copy link
Contributor Author

fritzmg commented Jul 9, 2019

Web Components, from what I see in bundle.js, does add one, so it may means that this is a WebComponents related issue

For me it is hard to distinguish between Web Components and the Extension itself. All I can see is, that this behavior occurs in the Magento Webshop. If it's a problem within the FACT-Finder Web Components, then it needs to be fixed there of course.

@fritzmg
Copy link
Contributor Author

fritzmg commented Jul 9, 2019

  • used browser

Firefox 68.0

  • used browser plugins (if have installed any)

Bitwarden, Passbolt, uBlock Origin, Xdebug

  • ff-communication parameters (excluding url and channel)
<ff-communication sid="" user-id="" url="" version="7.3" default-query="&#x2A;" channel="" use-url-parameter="true" only-search-params="false" disable-single-hit-redirect="true" use-asn="true" use-found-words="false" use-campaigns="true" generate-advisor-tree="false" use-personalization="true" use-semantic-enhancer="true" use-aso="true" use-browser-history="true" use-cache="true" disable-cache="false" currency-code="GBP" currency-country-code="de-DE" />

@fritzmg
Copy link
Contributor Author

fritzmg commented Nov 10, 2021

I have found a reproduction now:

  1. Focus the search input field (i.e. click into it).
  2. Press ctrl+shift+del to open up Firefox' or Chrome's Clear All History dialogue.
  3. Hit Enter to confirm your Clear All History selection.

This triggers a search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants