1

I recently configured Actiontext to work on my Rails 6.0.0 app. Everything works fine except the images in my app's Actiontext editor blinks every time I press enter to a new line. Can refer to the video below.

https://i.stack.imgur.com/OasG3.jpg

I'm unsure how to troubleshoot this problem. Could it be a misconfigured Actiontext or ActiveStorage?


Edited:

Here is my code,

//  javascript/packs/application.js
require("trix")
require("@rails/actiontext")


/*  assets/stylesheets/application.scss */
//=require actiontext


/*  assets/stylesheets/actiontext.scss */
@import "trix/dist/trix";

.trix-content {
  .attachment-gallery {
    > action-text-attachment,
    > .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%;
    }

    &.attachment-gallery--2,
    &.attachment-gallery--4 {
      > action-text-attachment,
      > .attachment {
        flex-basis: 50%;
        max-width: 50%;
      }
    }
  }

  action-text-attachment {
    .attachment {
      padding: 0 !important;
      max-width: 100% !important;
    }
  }
}

# app/models/card.rb
class Card < ApplicationRecord

  has_rich_text :answer

end


<%# app/views/cards/_form.html.erb %>
  <div class="form-group">
    <%= f.label :answer %>
    <%= f.rich_text_area :answer %>
  </div>  
chickensmitten
  • 477
  • 6
  • 16

1 Answers1

1

The problem went away after I upgraded from 6.0.0.rc1 to 6.0.3.

The upgrade also upgraded other gems. Some of which I think is the culprit:

-    rails (6.0.0)
-      actioncable (= 6.0.0)
-      actionmailbox (= 6.0.0)
-      actionmailer (= 6.0.0)
-      actionpack (= 6.0.0)
-      actiontext (= 6.0.0)
-      actionview (= 6.0.0)
-      activejob (= 6.0.0)
-      activemodel (= 6.0.0)
-      activerecord (= 6.0.0)
-      activestorage (= 6.0.0)
-      activesupport (= 6.0.0)
+    rails (6.0.3)
+      actioncable (= 6.0.3)
+      actionmailbox (= 6.0.3)
+      actionmailer (= 6.0.3)
+      actionpack (= 6.0.3)
+      actiontext (= 6.0.3)
+      actionview (= 6.0.3)
+      activejob (= 6.0.3)
+      activemodel (= 6.0.3)
+      activerecord (= 6.0.3)
+      activestorage (= 6.0.3)
+      activesupport (= 6.0.3)
chickensmitten
  • 477
  • 6
  • 16