selleronom / PrecisionTouchPadSwipe

Enables two-finger swipe (backwards/forwards) in Firefox for Precision Touchpads.
MIT License
8 stars 2 forks source link

Plugin corrupts login page forwarding #15

Open umousesonic opened 2 years ago

umousesonic commented 2 years ago

Describe the bug The plugin will stop login page of multiple websites from jumping to the next page, includding shibboleth, samsung account, etc.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://account.samsung.com/membership/intro'
  2. Click on 'login'
  3. enter username and password, click login
  4. page stops working, froze in blank jumping page

Expected behavior Jump to the next page

Desktop (please complete the following information):

n-hebert commented 2 years ago

Just tracked down that I'm seeing this on Amazon ECR, as well. The page just stays blank when this plug-in is enabled.

selleronom commented 2 years ago

@umousesonic @n-hebert Is this recent behavior or something old?

n-hebert commented 2 years ago

hey @selleronom -- I couldn't say; I just installed this plugin and it broke that page so I disabled it.

f00had commented 2 years ago

I have had similar issues with website elements failing to load correctly e.g. the rewards panel on Bing searches. I've been using the extension for a year and this issue has only started occurring recently.

artisticfox8 commented 2 years ago

@selleronom So wait, you reverted all of my pull requests, without investigating at all. I mean, a lot of them were big improvements

artisticfox8 commented 2 years ago

Just tracked down that I'm seeing this on Amazon ECR, as well. The page just stays blank when this plug-in is enabled.

Could you please post errors from the Developer console?

artisticfox8 commented 2 years ago

The thing is, the original extension was very lacking in user experience for:

artisticfox8 commented 2 years ago

Just tracked down that I'm seeing this on Amazon ECR, as well. The page just stays blank when this plug-in is enabled.

I know it's been quite a while, but I would really appreciate if you could test again

Just tracked down that I'm seeing this on Amazon ECR, as well. The page just stays blank when this plug-in is enabled.

I tried to reproduce this, and the page works normally on my computer. For testing, I used a Firefox Beta 101.0b9 (64-bit) on WIndows 10

artisticfox8 commented 2 years ago

I have had similar issues with website elements failing to load correctly e.g. the rewards panel on Bing searches. I've been using the extension for a year and this issue has only started occurring recently.

Hello, could you please paste the exact URL to test here? Also, are you using any other addons?

selleronom commented 2 years ago

@artisticfox8 reverted because of the reports on GitHub/AMO and dropping usage statistics. I rather not have a general release with potential usage breaking bugs on AMO.

Troubleshooting can be performed with specific users using a beta release. Let's focus on finding the issue here

@f00had is it this the URL for Bing Rewards? https://rewards.microsoft.com/

artisticfox8 commented 2 years ago

@artisticfox8 reverted because of the reports on GitHub/AMO and dropping usage statistics. I rather not have a general release with potential usage breaking bugs on AMO.

Troubleshooting can be performed with specific users using a beta release. Let's focus on finding the issue here

* [ ]  https://account.samsung.com/membership/intro

* [ ]  https://us-east-1.console.aws.amazon.com/ecr/repositories?region=us-east-1

@f00had is it this the URL for Bing Rewards? https://rewards.microsoft.com/

Ok. For the https://us-east-1.console.aws.amazon.com/ecr/repositories?region=us-east-1 URL, the website works on my computer (I could even send a video of it working completely fine with the release version 1.4.0 The URL redirects to a sign page, which works. Maybe, it doesn't after the login. But I can't really test that, as I don't have the paid AWS account

f00had commented 2 years ago

@selleronom the issue occurs on any search page, the rewards icon on the top right doesn't load, and you can't click on it to open the menu. It also prevents image searches from loading once you scroll down past the initial results, see how this page loads with version 1.3.0 and 1.4.0 https://www.bing.com/images/search?q=test&FORM=HDRSC2

artisticfox8 commented 2 years ago

@selleronom the issue occurs on any search page, the rewards icon on the top right doesn't load, and you can't click on it to open the menu. It also prevents image searches from loading once you scroll down past the initial results, see how this page loads with version 1.3.0 and 1.4.0 https://www.bing.com/images/search?q=test&FORM=HDRSC2

Just the regular search page (I don't know how this is connected with Microsoft rewards)?

EDIT: I can reproduce this: the images are indeed not loaded when the extension is running)

Could you please paste the errors on the page? Quick tutorial: press f12 on the page to open developer console, go to Console section and look for errors. Please report one's which have the following swipe.js:21:13 as a source (when using the 1.4.0 version)

artisticfox8 commented 2 years ago

@selleronom the issue occurs on any search page, the rewards icon on the top right doesn't load, and you can't click on it to open the menu. It also prevents image searches from loading once you scroll down past the initial results, see how this page loads with version 1.3.0 and 1.4.0 https://www.bing.com/images/search?q=test&FORM=HDRSC2

I can reproduce this, will investigate

artisticfox8 commented 2 years ago

@selleronom the issue occurs on any search page, the rewards icon on the top right doesn't load, and you can't click on it to open the menu. It also prevents image searches from loading once you scroll down past the initial results, see how this page loads with version 1.3.0 and 1.4.0 https://www.bing.com/images/search?q=test&FORM=HDRSC2

@selleronom the issue occurs on any search page, the rewards icon on the top right doesn't load, and you can't click on it to open the menu. It also prevents image searches from loading once you scroll down past the initial results, see how this page loads with version 1.3.0 and 1.4.0 https://www.bing.com/images/search?q=test&FORM=HDRSC2

Just the regular search page (I don't know how this is connected with Microsoft rewards)?

EDIT: I can reproduce this: the images are indeed not loaded when the extension is running)

Could you please paste the errors on the page? Quick tutorial: press f12 on the page to open developer console, go to Console section and look for errors. Please report one's which have the following swipe.js:21:13 as a source (when using the 1.4.0 version)

EDIT2: OK, so at first I thought, it has to do something with the ElementsWithScrolls function. But after more testing, I found that the MutationObserver code (line 42) blocks the page.

artisticfox8 commented 2 years ago

When I uncomment ElementsWithScrolls and setScrollingLeftOrRightFromElement and listenForScrollEvents and even

horizontalScrollElementsArray = ElementsWithScrolls();
horizontalScrollElementsArray.forEach(listenForScrollEvents);

images still load.

After more testing it is the Mutationobservers code (lines 42-65)

artisticfox8 commented 2 years ago

@f00had Can you test now? With the version at artisticfox8/PrecisionTouchPadSwipe

artisticfox8 commented 2 years ago

@selleronom Can you test on bing images now? With the version at artisticfox8/PrecisionTouchPadSwipe

artisticfox8 commented 2 years ago

@selleronom Come on it is good now sir

selleronom commented 2 years ago

@artisticfox8 made a draft PR with the latest commit at your repo but the incoming change does not seem to be relevant to this?

function setData(){
    let gettingItems = chrome.storage.local.get();
    gettingItems.then(applySettings, onError);
}

browser.storage.onChanged.addListener(setData);

//TODO: solve: find a way to register the element overscroll-x listeners on single page applications like github.com everytime the user navigates to the page because: after the eventlisteners for overscroll elements are unregistered after the element is unloaded after page navigation
//So basically, call ElementsWithScrolls on every URL change: the webNavigation API is the way, because the MutationObserver code blocks bing image search (https://github.com/selleronom/PrecisionTouchPadSwipe/issues/15)
f00had commented 2 years ago

@f00had Can you test now? With the version at artisticfox8/PrecisionTouchPadSwipe

I couldn't find a version to download on your page.

There's a setting now in about:config called widget.disable-swipe-tracker which, when set to false, enables swipe navigation, so I've stopped using this add-on.

artisticfox8 commented 2 years ago

@artisticfox8 made a draft PR with the latest commit at your repo but the incoming change does not seem to be relevant to this?

function setData(){
  let gettingItems = chrome.storage.local.get();
  gettingItems.then(applySettings, onError);
}

browser.storage.onChanged.addListener(setData);

//TODO: solve: find a way to register the element overscroll-x listeners on single page applications like github.com everytime the user navigates to the page because: after the eventlisteners for overscroll elements are unregistered after the element is unloaded after page navigation
//So basically, call ElementsWithScrolls on every URL change: the webNavigation API is the way, because the MutationObserver code blocks bing image search (https://github.com/selleronom/PrecisionTouchPadSwipe/issues/15)

Hello, the thing is the images bing page mentioned somehow didn't work when the Mutationobserver code was there. So I removed it. What the code did was listening to URL change and running the function which attaches the scroll event listeners to appropriate elements. That was needed every time the user returned to a page that uses the html5 History API with the browser back button, because event listeners are removed after a different URL is viewed. One example of a website where this is needed is github. Basically, content script on github doesn't run every time the URL is changed, only the first time github is loaded on that tab. So there was this code which detected the URL changes on github, as the user navigated through github, to make the addon work properly with overflow-x elements

artisticfox8 commented 2 years ago

Once you test that it works with bing, I can reimplement those URL checks with the Extension webNavigation API