cancel
Showing results for 
Search instead for 
Did you mean: 

Damn Lithium!

pvmb
Seasoned Pro
Posts: 1,304
Thanks: 233
Fixes: 11
Registered: ‎12-02-2014

Damn Lithium!

I know there is no point now but I just have to let off steam about damned Lithium!

 

What exactly is the point of forum software that seems mainly dedicated to discouraging posting on a forum?

Apart from when composing any posts whatsoever I have to avoid so much as looking at any 'wrong type of keys' - or else BANG! That's the end of that post.

Apart from when quoting posts I have to always remember to start the post with a SPACE or NEWLINE before I do anything else, or I just get caught in the...

Quote Repeat
Quote Repeat
Quote Repeat
Quote Repeat

...line forever.

But why exactly does Lithium randomly decide to put up this silly and annoying box during editing:

Reload site?
Changes you made may not be saved.
X Prevent this page from creating additional dialogues
Reload Cancel

Touch anything you shouldn't when this appears (what SHOULD you touch?) and BANG! There goes another post.

OK. I know nobody really knows the answer to any of these mysteries. It's just Lithium.

4 REPLIES 4
jab1
The Full Monty
Posts: 23,565
Thanks: 8,354
Fixes: 353
Registered: ‎24-02-2012

Re: Damn Lithium!

I know it doesn't answer your question, but I don't encounter any of the issues you raise above, and I haven't seen anyone else mention them either.

John
pvmb
Seasoned Pro
Posts: 1,304
Thanks: 233
Fixes: 11
Registered: ‎12-02-2014

Re: Damn Lithium!

...Well, if that is true, then it's even weirder than I thought! 😮

 

P.S. Had Lithium pop up nuisance box during this post. Time to get paranoid?

Apparently, wrt that pop up nuisance box - which I only ever encounter posting on this forum:

javascript - How to disable a "Reload site? Changes you made may not be saved" popup for (python) se...

"This popup with text as Reload siteChanges you made may not be saved is the implementation of onbeforeunload property of WindowEventHandlers

onbeforeunload

The onbeforeunload property of the WindowEventHandlers mixin is the EventHandler for processing beforeunload events. These events fire when a window is about to unload its resources. At this point, the document is still visible and the event is still cancelable.

Solution

There are different strategies available to handle this popup.

  • Chrome solution: Using --disable-popup-blocking through ChromeOptions():

    from selenium import webdriver
    
    options.add_argument("--disable-popup-blocking")
    driver=webdriver.Chrome(chrome_options=options, executable_path=/path/to/chromedriver')
  • Firefox solution: Using dom.disable_beforeunload through FirefoxProfile():

    from selenium import webdriver
    profile = webdriver.FirefoxProfile()
    profile.set_preference("dom.disable_beforeunload", True)
    driver = webdriver.Firefox(firefox_profile = profile)
  • Cross Browser solution: As a Cross Browser solution, you can disable this dialog invoking the executeScript() to set window.onbeforeunload as function() {}; and you can use the following solution:

    driver.execute_script("window.onbeforeunload = function() {};")
  • JQuery based solution:

    $I->executeJS( "window.onbeforeunload = null" );

You can find a relevant discussion in How to handle below Internet Explorer popup “Are you sure you want to leave this page?” through Selenium

--undetected Selenium"

🙄

Plus:

Disable annoying "Leave site? Changes you made may not be saved" Pop-up

https://www.reddit.com/r/chrome/comments/jjg1wp/disable_annoying_leave_site_changes_you_made_may/

I like that extension name: "Let me out".

dvorak
Moderator
Moderator
Posts: 30,350
Thanks: 6,923
Fixes: 1,491
Registered: ‎11-01-2008

Re: Damn Lithium!


Moderators Note


This topic has been moved from Plusnet Feedback to Community Feedback.

Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
pvmb
Seasoned Pro
Posts: 1,304
Thanks: 233
Fixes: 11
Registered: ‎12-02-2014

Re: Damn Lithium!


@jab1 wrote:

I know it doesn't answer your question, but I don't encounter any of the issues you raise above, and I haven't seen anyone else mention them either.


FWIW - You may(?) be correct that these faults (there are many) are more down to possibly MS than Lithium, however, it is only while using Lithium they are apparent to me!

There are endless, random, tiresome, fiddle-faddles I have to go through, posting on this Lithium forum, whatever the root cause is.