Index: src/wp-admin/js/common.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/js/common.js	(date 1511971181000)
+++ src/wp-admin/js/common.js	(date 1511998409000)
@@ -90,13 +90,23 @@
 showNotice = {
 	warn : function() {
 		var msg = commonL10n.warnDelete || '';
-		if ( confirm(msg) ) {
+		if ( confirm( msg ) ) {
 			return true;
 		}
 
 		return false;
 	},
 
+    warnOffline : function() {
+        var msg = commonL10n.warnOffline || '';
+        if ( navigator.onLine !== true ){
+            return confirm( msg );
+        }
+
+        // If navigator.onLine returns true or it isn't supported by the current browser, proceed
+        return true;
+    },
+
 	note : function(text) {
 		alert(text);
 	}
Index: src/wp-admin/js/inline-edit-post.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/js/inline-edit-post.js	(date 1511971181000)
+++ src/wp-admin/js/inline-edit-post.js	(date 1511998409000)
@@ -391,6 +391,11 @@
 	 *                       Enter on a focused field.
 	 */
 	save : function(id) {
+
+        if ( ! showNotice.warnOffline() ){
+            return false;
+        }
+
 		var params, fields, page = $('.post_status_page').val() || '';
 
 		if ( typeof(id) === 'object' ) {
Index: src/wp-admin/js/nav-menu.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/js/nav-menu.js	(date 1511971181000)
+++ src/wp-admin/js/nav-menu.js	(date 1511998409000)
@@ -844,7 +844,13 @@
 			 * When a navigation menu is saved, store a JSON representation of all form data
 			 * in a single input to avoid PHP `max_input_vars` limitations. See #14134.
 			 */
-			$( '#update-nav-menu' ).submit( function() {
+			$( '#update-nav-menu' ).submit( function( event ) {
+
+			    if ( ! showNotice.warnOffline() ){
+                    event.preventDefault();
+                    return;
+                }
+
 				var navMenuData = $( '#update-nav-menu' ).serializeArray();
 				$( '[name="nav-menu-data"]' ).val( JSON.stringify( navMenuData ) );
 			});
Index: src/wp-admin/js/post.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/js/post.js	(date 1511971181000)
+++ src/wp-admin/js/post.js	(date 1511998409000)
@@ -884,8 +884,17 @@
 			event.preventDefault();
 		});
 
-		// Cancel submit when an invalid timestamp has been selected.
 		$('#post').on( 'submit', function( event ) {
+
+		    var $publishingActionSpinner = $( '#publishing-action .spinner' );
+
+            if ( ! showNotice.warnOffline() ){
+                $publishingActionSpinner.removeClass( 'is-active' );
+                event.preventDefault();
+                return;
+            }
+
+            // Cancel submit when an invalid timestamp has been selected.
 			if ( ! updateText() ) {
 				event.preventDefault();
 				$timestampdiv.show();
@@ -894,7 +903,7 @@
 					wp.autosave.enableButtons();
 				}
 
-				$( '#publishing-action .spinner' ).removeClass( 'is-active' );
+                $publishingActionSpinner.removeClass( 'is-active' );
 			}
 		});
 
Index: src/wp-includes/script-loader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-includes/script-loader.php	(date 1511971181000)
+++ src/wp-includes/script-loader.php	(date 1511998409000)
@@ -78,6 +78,7 @@
 	$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
 	did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
 		'warnDelete'   => __( "You are about to permanently delete these items from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete." ),
+		'warnOffline'  => __( 'You are offline at the current moment. Are you sure you want to proceed?' ),
 		'dismiss'      => __( 'Dismiss this notice.' ),
 		'collapseMenu' => __( 'Collapse Main menu' ),
 		'expandMenu'   => __( 'Expand Main menu' ),
