1

I'm developing a homepage to a small org right now and I got a problem with my page in chrome. (I do not see the same behavior in other browsers.)

The code looks like this:

<form action="add.php" method="post" enctype="multipart/form-data">
    <label>Test:</label><br>
    <input name="title" type="text"><br>
    <label>Test:</label><br>
    <textarea name="text" type="text"></textarea><br>
    <label>Test:</label><br>
    <input name="date" type="text"><br>
    <label>Test:</label><br>
    <input type="file" style="display:none" name="picture" id="picture">
    <br><label for="picture" class="buttonlookalike">Test</label><br>
    <br>
    <button>Test</button>
</form>

The first time I press on the textarea, after refreshing the page, the background jumps around for about 1 second and then return to the position. Here is a link to a video to show the problem. (The video shows how it looks for the user and it's about 7 seconds long.)

A youtube video of the problem

I do not have any javascript which acts on the textarea or the form. I have a CSS which change the color and size of objects, which includes the textarea.

Update 1

Here is my CSS:

input, textarea {
  max-width:100%;
  width: 500px;
}

textarea {
  height: 100px;
  background-color: red;
}

Update 2

I found out that this behavior only appears if you have Grammarly installed in your chrome. (If I deactivate it for my page the problem goes away.)

Erik Dahlen
  • 72
  • 1
  • 16

2 Answers2

1

This was already answered here: How to stop extensions/add ons like grammarly on contenteditable editors.

To fix the Gramarly you can add atribute data-gramm_editor="false" on the < textarea> element.

Wreigh
  • 3,215
  • 16
  • 37
ShyFlax
  • 11
  • 2
0
  1. Try to remove height: 100px; and set textarea height through row attribute.
  2. I discovered that such behavior caused one of my chrome extension. In my case it was Grammarly.
  • If I change from height=100px and use rows=5 I get the same problem. But if remove them totally I do not get the problem, but I want a bigger textarea. – Erik Dahlen Aug 30 '18 at 06:56