We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Saiba mais

Esta discussão foi arquivada. Faça uma nova pergunta se precisa de ajuda.

Pop-up message: "this page is asking you to confirm that you want to leave - data you have entered may not be saved"

more options

It happens often: I am typing into a text input form on a website, and the pop-up (see attachment) appears for no apparent reason. In other words, I did not deliberately try to abandon my text entries, but for some reason the browser believes I have. Perhaps this is down to the overuse of shortcuts and touchpad "gestures" in my Macbook? I don't know why it happens, but it does. My question only concerns what happens AFTER the pop-up appears.

The pop-up has two buttons: "Stay on page", and the DEFAULT "Leave Page".

I have lost hours of work (text entry) because the DEFAULT is to "Leave Page". Again, this may be "physically" due to the twitchy Apple products I use, but it could be avoided if the DEFAULT were set to "Stay on page".

That is my first question: How do I change the DEFAULT to "Stay on page"?

I am told that this pop-up is the product of JavaScript running in my browser. That's all well and good, but it's not clear to me whose script this is.

My second question: What is the SOURCE of the JavaScript producing the pop-up; i.e. is this sourced by Mozilla, or is it sourced by the website creators?

It happens often: I am typing into a text input form on a website, and the pop-up (see attachment) appears for no apparent reason. In other words, I did not deliberately try to abandon my text entries, but for some reason the browser believes I have. Perhaps this is down to the overuse of shortcuts and touchpad "gestures" in my Macbook? I don't know why it happens, but it does. '''My question only concerns what happens AFTER the pop-up appears. ''' The pop-up has two buttons: "Stay on page", and the DEFAULT "Leave Page". I have lost hours of work (text entry) because the DEFAULT is to "Leave Page". Again, this may be "physically" due to the twitchy Apple products I use, but it could be avoided if the DEFAULT were set to "Stay on page". That is my first question: '''How do I change the DEFAULT to "Stay on page"? ''' I am told that this pop-up is the product of JavaScript running in my browser. That's all well and good, but it's not clear to me whose script this is. My second question: '''What is the SOURCE of the JavaScript producing the pop-up'''; i.e. is this sourced by Mozilla, or is it sourced by the website creators?
Capturas de tela anexadas

Solução escolhida

Yes, anything you type that isn't an exact match to an existing preference will generate that bar with the plus button to create a new preference.

Ler esta resposta 👍 1

Todas as respostas (6)

more options

Websites can set up an event listener on the "beforeunload" event. Firefox displays that standard dialog in that case. Firefox won't display the dialog on its own.

I'm not aware of a way to change the default button in the dialog.

Source of the Issue

Do you think it's possible that a gesture does the same thing as the Back button? That would be considered navigating away from the page.

The Backspace key, when pressed outside of a form field, can trigger Back. To rule that out, here's how you can disable that feature:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste backsp and pause while the list is filtered

(3) Double-click the browser.backspace_action preference to display an editing field, and change the value to 2 then press Return or click the blue check mark button to save the change.

More info on about:config: Configuration Editor for Firefox.

Potential Workarounds

There are some add-ons for saving form data as you work to protect against data loss. I haven't tried these myself:

more options

Two fields presented in response to `backsp`: the one you described, and one other - a Boolean simply labeled backsp. (See attachment) I wasn't sure what to do about the Boolean - or if they were related. Apparently I changed it, and now it says True. Is that correct, or should it be False?

more options

Oh, you didn't need to create a new preference called backsp. You can use the trash can icon at the right end of the bar to delete it. Anyway, Firefox is ignoring it since it doesn't match up with any known extension.

more options

Odd... AFAIK, I did nothing to create it. I followed your instructions, and there it was. When I first saw it, the "radio button" for Boolean was selected - I thought it was advising the data type of the browser.backspace_action preference!

That's good to know... I guess it does this (offer to create a new preference) each time you search for a term?

more options

And just one other thing before leaving this:

What was the logic behind setting the default action as "Leave Page"? I just don't get that.

Oh - a second thing: Thanks so much for your time, and your help. I feel enlightened  :)

more options

Solução escolhida

Yes, anything you type that isn't an exact match to an existing preference will generate that bar with the plus button to create a new preference.