diff --git a/lib/src/document/document.dart b/lib/src/document/document.dart
index d001551e..4b2267e2 100644
--- a/lib/src/document/document.dart
+++ b/lib/src/document/document.dart
@@ -192,17 +192,28 @@ class Document {
         res = queryChild(--index);
       }
       //
-      final style = (res.node as Line).collectStyle(res.offset, 0);
+      var style = (res.node as Line).collectStyle(res.offset, 0);
       final remove = <Attribute>{};
+      final add = <String, Attribute>{};
       for (final attr in style.attributes.values) {
         if (!Attribute.inlineKeys.contains(attr.key)) {
           if (!current.containsKey(attr.key)) {
             remove.add(attr);
+          } else {
+            /// Trap for type of block attribute is changing
+            final curAttr = current.attributes[attr.key];
+            if (curAttr!.value != attr.value) {
+              remove.add(attr);
+              add[curAttr.key] = curAttr;
+            }
           }
         }
       }
       if (remove.isNotEmpty) {
-        return style.removeAll(remove);
+        style = style.removeAll(remove);
+      }
+      if (add.isNotEmpty) {
+        style.attributes.addAll(add);
       }
       return style;
     }
diff --git a/test/document/document_test.dart b/test/document/document_test.dart
index c672e74d..f1fef3a1 100644
--- a/test/document/document_test.dart
+++ b/test/document/document_test.dart
@@ -4,6 +4,60 @@ import 'package:test/test.dart';
 
 void main() {
   group('collectStyle', () {
+    /// Lists and alignments have the same block attribute key but can have different values.
+    /// Changing the format value updates the document but must also update the toolbar button state
+    /// by ensuring the collectStyles method returns the attribute selected for the newly entered line.
+    test('Change block value type', () {
+      void doTest(Map<String, dynamic> start, Attribute attr,
+          Map<String, dynamic> change) {
+        /// Create a document with 2 lines of block attribute using [start]
+        /// Change the format of the last line using [attr] and verify [change]
+        final delta = Delta()
+          ..insert('A')
+          ..insert('\n', start)
+          ..insert('B')
+          ..insert('\n', start);
+        final document = Document.fromDelta(delta)
+
+          /// insert a newline
+          ..insert(3, '\n');
+
+        /// Verify inserted blank line and block type has not changed
+        expect(
+            document.toDelta(),
+            Delta()
+              ..insert('A')
+              ..insert('\n', start)
+              ..insert('B')
+              ..insert('\n\n', start));
+
+        /// Change format of last (empty) line
+        document.format(4, 0, attr);
+        expect(
+            document.toDelta(),
+            Delta()
+              ..insert('A')
+              ..insert('\n', start)
+              ..insert('B')
+              ..insert('\n', start)
+              ..insert('\n', change),
+            reason: 'document updated');
+
+        /// Verify that the reported style reflects the newly formatted state
+        expect(document.collectStyle(4, 0), Style.attr({attr.key: attr}),
+            reason: 'collectStyle reporting correct attribute');
+      }
+
+      doTest({'list': 'ordered'}, const ListAttribute('bullet'),
+          {'list': 'bullet'});
+      doTest({'list': 'checked'}, const ListAttribute('bullet'),
+          {'list': 'bullet'});
+      doTest({'align': 'center'}, const AlignAttribute('right'),
+          {'align': 'right'});
+      doTest({'align': 'left'}, const AlignAttribute('center'),
+          {'align': 'center'});
+    });
+
     /// Enter key inserts newline as plain text without inline styles.
     /// collectStyle needs to retrieve style of preceding line
     test('Simulate double enter key at end', () {