The following warnings occurred:
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.13 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/printthread.php(287) : eval()'d code 2 errorHandler->error_callback
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



CentBrowser Forum
scroll problems - Printable Version

+- CentBrowser Forum (https://www.centbrowser.net/en)
+-- Forum: Product Related (https://www.centbrowser.net/en/forumdisplay.php?fid=1)
+--- Forum: Bugs & Suggestions (https://www.centbrowser.net/en/forumdisplay.php?fid=4)
+--- Thread: scroll problems (/showthread.php?tid=2729)

Pages: 1 2


RE: scroll problems - patrickdrd - 04-23-2019

(04-22-2019, 03:08 PM)rock888 Wrote: Settings  --> search gesture

I just checked enable mouse gesture is set to off


RE: scroll problems - patrickdrd - 04-23-2019

I think I found it, I have a script in tampermonkey to disable all these annoying "close this page" popups,
here's the code:
Code:
// ==UserScript==
// @name kill_beforeunload
// @namespace Violentmonkey Scripts
// @include     *
// @grant none
// @run-at document-start
// ==/UserScript==
//

EventTarget.prototype.addEventListenerBase = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(type, listener)
    {
      if(type=="beforeunload") {
          return; //ignore attempts to add a beforeunload event
      }
      this.addEventListenerBase(type, listener); //treat all other events normally
};

function unsetOnBeforeUnload() {

    window.onbeforeunload = function(event) {};

    setTimeout(unsetOnBeforeUnload, 300); //optional, but some pages might set the event later in the page's lifecycle

}

document.addEventListener("DOMContentLoaded", unsetOnBeforeUnload);

I disabled it for youtube and now scrolling works when I switch to new comments for example,
which was impossible to work without that


RE: scroll problems - Admini - 04-23-2019

(04-23-2019, 08:44 AM)patrickdrd Wrote: I think I found it, I have a script in tampermonkey to disable all these annoying "close this page" popups,
here's the code:
Code:
// ==UserScript==
// @name kill_beforeunload
// @namespace Violentmonkey Scripts
// @include     *
// @grant none
// @run-at document-start
// ==/UserScript==
//

EventTarget.prototype.addEventListenerBase = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(type, listener)
   {
     if(type=="beforeunload") {
         return; //ignore attempts to add a beforeunload event
     }
     this.addEventListenerBase(type, listener); //treat all other events normally
};

function unsetOnBeforeUnload() {

   window.onbeforeunload = function(event) {};

   setTimeout(unsetOnBeforeUnload, 300); //optional, but some pages might set the event later in the page's lifecycle

}

document.addEventListener("DOMContentLoaded", unsetOnBeforeUnload);

I disabled it for youtube and now scrolling works when I switch to new comments for example,
which was impossible to work without that

I think there is dead loop in this script.


RE: scroll problems - patrickdrd - 04-23-2019

can you fix it?
or do you think I should get rid of it?
maybe the loop is in order to serve its cause?


RE: scroll problems - Admini - 04-24-2019

(04-23-2019, 04:28 PM)patrickdrd Wrote: can you fix it?
or do you think I should get rid of it?
maybe the loop is in order to serve its cause?

Yes, it intends to do that.
I suggest disabling or removing it.


RE: scroll problems - patrickdrd - 04-25-2019

I need it for those annoying popups in pages asking me if I want to leave page/site,
is there any other way to turn this off?


RE: scroll problems - Admini - 04-25-2019

(04-25-2019, 07:06 AM)patrickdrd Wrote: I need it for those annoying popups in pages asking me if I want to leave page/site,
is there any other way to turn this off?

Just try adding "//"(without quotes) in front of "setTimeout(unsetOnBeforeUnload, 300);".


RE: scroll problems - patrickdrd - 04-30-2019

actually I can't do that, because this part of code is needed for the correct working of the script,
e.g. go over to the page: https://regex101.com
type anything in the two boxes and then try to close the tab,
you will be asked if you're sure you want to leave the site,
this kind of messages are eliminated with the above code


RE: scroll problems - Admini - 04-30-2019

(04-30-2019, 10:32 AM)patrickdrd Wrote: actually I can't do that, because this part of code is needed for the correct working of the script,
e.g. go over to the page: https://regex101.com
type anything in the two boxes and then try to close the tab,
you will be asked if you're sure you want to leave the site,
this kind of messages are eliminated with the above code

You may suggest the author to add blacklist feature, so you can disable this script on websites where it will cause problem.


RE: scroll problems - patrickdrd - 04-30-2019

this is already implemented in tampermonkey I'm using so as I said I disabled it on youtube where it was causing problems for me