diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module
index ea6f1477cc49d9cdfbf4ac6e88cf58ae34e4dafd..339e255f16ab54335062fe2291b7682e773f32b6 100644
--- a/core/modules/edit/edit.module
+++ b/core/modules/edit/edit.module
@@ -182,7 +182,13 @@ function edit_field_formatter_info_alter(&$info) {
 function edit_preprocess_field(&$variables) {
   $element = $variables['element'];
   $entity = $element['#object'];
-  $variables['attributes']['data-edit-id'] = $entity->entityType() . '/' . $entity->id() . '/' . $element['#field_name'] . '/' . $element['#language'] . '/' . $element['#view_mode'];
+
+  // Fields that are not part of the entity (i.e. dynamically injected "pseudo
+  // fields") and computed fields are not editable.
+  $definition = $entity->getPropertyDefinition($element['#field_name']);
+  if ($definition && empty($definition['computed'])) {
+    $variables['attributes']['data-edit-id'] = $entity->entityType() . '/' . $entity->id() . '/' . $element['#field_name'] . '/' . $element['#language'] . '/' . $element['#view_mode'];
+  }
 }
 
 /**
diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
index eecf864ea74a0eeba12015d94ba23cc0bb24b593..1c18e04abb904b7c102d01c2d449c62944245868 100644
--- a/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
+++ b/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
@@ -291,4 +291,17 @@ function testUserWithPermission() {
     }
   }
 
+  /**
+   * Tests that Edit doesn't make pseudo fields or computed fields editable.
+   */
+  function testPseudoFields() {
+    \Drupal::moduleHandler()->install(array('edit_test'));
+
+    $this->drupalLogin($this->author_user);
+    $this->drupalGet('node/1');
+
+    // Check that the data- attribute is not added.
+    $this->assertNoRaw('data-edit-id="node/1/edit_test_pseudo_field/und/default"');
+  }
+
 }
diff --git a/core/modules/edit/tests/modules/edit_test.module b/core/modules/edit/tests/modules/edit_test.module
index d74528d5ccf92ba40a9ddb1f6e6de324d7ace0b3..bf708bb393fcb44b69e3839a43a3f933b57613b2 100644
--- a/core/modules/edit/tests/modules/edit_test.module
+++ b/core/modules/edit/tests/modules/edit_test.module
@@ -4,3 +4,36 @@
  * @file
  * Helper module for the Edit tests.
  */
+
+use Drupal\Core\Language\Language;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\entity\Entity\EntityDisplay;
+
+/**
+ * Implements hook_entity_view_alter().
+ */
+function edit_test_entity_view_alter(&$build, EntityInterface $entity, EntityDisplay $display) {
+  if ($entity->entityType() == 'node' && $entity->bundle() == 'article') {
+    $build['pseudo'] = array(
+      '#theme' => 'field',
+      '#title' => 'My pseudo field',
+      '#field_name' => 'edit_test_pseudo_field',
+      '#label_display' => 'Label',
+      '#entity_type' => $entity->entityType(),
+      '#bundle' => $entity->bundle(),
+      '#language' => Language::LANGCODE_NOT_SPECIFIED,
+      '#field_type' => 'pseudo',
+      '#view_mode' => 'default',
+      '#object' => $entity,
+      '#access' => TRUE,
+      '#items' => array(
+        0 => array(
+          'value' => 'pseudo field',
+        ),
+      ),
+      0 => array(
+        '#markup' => 'pseudo field',
+      ),
+    );
+  }
+}