alleyinteractive / alleyinteractive/wordpress-fieldmanager

Support for onbeforeunload browser alert

Aperta
#514 3 commenti 0 reazioni 1 assegnatario Rivendicata da @mboynes Vedi su GitHub
enhancement
Lingua principale
PHP
Stelle
563
Fork
99
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The post editing screen in WordPress includes an `onbeforeunload` event handler which triggers the browser's "Do you want to leave this site? Changes you made may not be saved." alert box if you've entered a value into the post title or post content area and then attempt to navigate away from the page without saving.

It would be great if Fieldmanager supported this functionality for fields within custom meta boxes. That way, if a user enters a bunch of information into custom field inputs (not including the post title and post content), and the attempts to navigate away from the page, they'll see the same alert.

I'm not sure if should be an opt-in parameter when registering fields, or whether it should default to this behaviour.

Thoughts?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.