New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 833602 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Textarea with a float style will disappear if it had a scrollbar and you deleted all content

Reported by janos.ge...@gmail.com, Apr 16 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Example URL:
http://www.woodpecker.hu/temp/TanProjekt.html

Steps to reproduce the problem:
1. Select all text in the textarea
2. Press the delete button
3. THe textarea will disappear

What is the expected behavior?
It shouldn't disappear
btw: this also happens with other elements, e.g. div-s. It the div has a scrollbar, itt will disappear if I remove content with js, so that it wouldn't need a scrollbar

What went wrong?
The textarea disappeared
Attaching a test case

Does it occur on multiple sites: Yes

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 10.0
Flash Version: 

I have seen this bug before, but you have labaled it as wontfix and closed the bug. Why?
 
TanProjekt.html
2.3 KB View Download
Labels: Needs-Triage-M65
Labels: M-68 Triaged-ET FoundIn-68 Target-68 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome reported version #65.0.3325.181 and latest canary #68.0.3397.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Components: -Blink Blink>Forms>Textarea Blink>Layout
Can reproduce. I needed to resize the text area so it had a scrollbar.
Just to show you this happens with non-textarea elements too:
http://www.woodpecker.hu/temp/disappearing_table/Darusin_disappearing.html

All I do is change the innerHTML of a div when you click the button.

I tried stripping the example code of any unneccesary stuff, but the content and structure might be more compilcated then needed for this example.

Should I file a seperate bug report?
disappearing_table.zip
24.7 KB Download

Comment 5 by e...@chromium.org, Apr 19 2018

Cc: atotic@chromium.org robho...@gmail.com
Status: Available (was: Untriaged)
Possible workaround until bug is fixed:

1. TextArea, using javascript and jquery:
function redrawElement(id) {
    var opacity = document.getElementById(id).style.opacity;    
    if(opacity == null || opacity == '' || opacity == 1) document.getElementById(id).style.opacity = 0.99;
    else document.getElementById(id).style.opacity = (parseFloat(opacity) + 0.01);          
}

window.addEventListener('load', function() { 
  jQuery('textarea').bind('keyup input', function(i, e){redrawElement(this.id);});   
});

2. Disappearing table after setting innerHTML:
 
//Do this after setting innerHTML
element.innerHTML = ...;
element.style.transform = "translate3d(0, 0, 0)";

Comment 7 by atotic@chromium.org, Apr 25 2018

Components: Blink>Paint>Invalidation
This is a paint bug, maybe root scrolling related?

After scrollbar disappears, the text area is positioned correctly (you can see
it in DevTools), but it does not paint. 
Status: Untriaged (was: Available)
Components: -Blink>Forms>Textarea -Blink>Layout
Status: Available (was: Untriaged)
Very odd bug. Still happening on ToT with SPv175.
I see this issue has a Target-68 tag, so I just tested it with the chrome beta (version: 68.0.3440.25 64bit on Windows10). 
Both issues (textarea and table) persist. This is quite important for us, because the workaround I suggested ruins the table if we use a fixed table header. When do you think this will get fixed?

Comment 11 Deleted

Found a hack-workaround to the dissapearing table (div). When setting innerHtml, do this:

element.innerHTML = newContent;
element.style.transform = "translate3d(0, 0, 0)";  
setTimeout( function() { 
  element.style.transform = "";
},10);
setTimeout( function() { 
  element.innerHTML = element.innerHTML;
},30);
The problem is probably that the object loses its shouldPaint bit on the 
FloatingObject, in combination with compositing (the workaround suggested
in comment 12 hints at this also).
Components: -Blink>Paint>Invalidation Blink>Paint
Owner: chrishtr@google.com
Status: Assigned (was: Available)
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80f9e6e7a9840612aa15233920df0cc152ac014c

commit 80f9e6e7a9840612aa15233920df0cc152ac014c
Author: Chris Harrelson <chrishtr@chromium.org>
Date: Mon Aug 27 17:42:01 2018

[PE] Fix float painting under inline when self-painting status changes

Previously we did not consider non-BlockFlow elements in the containing block chain
between the float and the containing BlockFlow.

The code being fixed was introduced here, as part of solving a similar situation:
https://codereview.chromium.org/1661523002. It seems that the case of under-inline was not
skipped on purpose.

Bug:  833602 

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I311ebb3d9f2172ed041bf0e6c8a583d89ae1a74a
Reviewed-on: https://chromium-review.googlesource.com/1188980
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586301}
[modify] https://crrev.com/80f9e6e7a9840612aa15233920df0cc152ac014c/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[add] https://crrev.com/80f9e6e7a9840612aa15233920df0cc152ac014c/third_party/WebKit/LayoutTests/paint/float/float-under-inline-self-painting-change-expected.html
[add] https://crrev.com/80f9e6e7a9840612aa15233920df0cc152ac014c/third_party/WebKit/LayoutTests/paint/float/float-under-inline-self-painting-change.html
[modify] https://crrev.com/80f9e6e7a9840612aa15233920df0cc152ac014c/third_party/blink/renderer/core/layout/layout_block_flow.cc
[modify] https://crrev.com/80f9e6e7a9840612aa15233920df0cc152ac014c/third_party/blink/renderer/core/paint/paint_layer.cc

Owner: chrishtr@chromium.org
Status: Fixed (was: Assigned)
Good news, thank you!
One more question: what do you think, which version of Chrome will include this fix?
This seems to have been resolved for version: 70.0.3538.67
Thank you!

Sign in to add a comment