You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Hi. Thank you for putting all these interesting articles together.)
I believe there's an issue with the mirroring from the first article, and this issue find its way in the next parts as well.
Although you're setting the scrollTop of the mirrored div to the scrollTop of the textarea on scroll, it's still going out of sync for some reasons once one or more empty new lines are entered at the bottom of the textarea.
Here's a screenshot of the issue:
I just typed a few more "you\n\n"s so that the area gets a scrollbar, and then I scrolled up a bit.
I don't know why this is happening yet, but it's obviously not expected.
I've encountered and reproduced this in my own code too, when I was trying your first article (just doing the mirroring). I just used a red color (any color other than transparent works as well) instead of transparent, and it's in sync on scroll, however, as soon as I entered a newline at the last line, it went out of sync.
The text was updated successfully, but these errors were encountered:
(Hi. Thank you for putting all these interesting articles together.)
![image](https://private-user-images.githubusercontent.com/52244768/297518062-34756f2e-eca4-48aa-a2d6-d9bc1e1862c2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MjI2NTAsIm5iZiI6MTcyMDUyMjM1MCwicGF0aCI6Ii81MjI0NDc2OC8yOTc1MTgwNjItMzQ3NTZmMmUtZWNhNC00OGFhLWEyZDYtZDliYzFlMTg2MmMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEwNTIzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlNTBmYmJiMjEwZWNjZjQzYzEwOGIyYWRjN2IzY2IwNTU4NjY0ZTUwYTJmZTgyYzYyZTM1N2E0Nzg0ZmYzMjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NJ9Iv5F0jS156tZRr93IYIu8FT6YxXyGsqjrGzHri_w)
![image](https://private-user-images.githubusercontent.com/52244768/297519715-24ea478c-888e-49da-9dbc-112b52c61bec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MjI2NTAsIm5iZiI6MTcyMDUyMjM1MCwicGF0aCI6Ii81MjI0NDc2OC8yOTc1MTk3MTUtMjRlYTQ3OGMtODg4ZS00OWRhLTlkYmMtMTEyYjUyYzYxYmVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEwNTIzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQyNTFmZGY3Y2ZhNDY3MmM0YTgwNTUwOGM0NjM4ZDYxZDhmNWMwZjRmNTQ4OWQ2NTk1MDI1OTU1YjllYWRiNzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.e-320Mt8HXaID_oyCLOpptFXQBM8wcq2WWxQGc8Rf58)
![image](https://private-user-images.githubusercontent.com/52244768/297519815-9e92f1ea-d8b6-4e16-97cf-84350379badc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MjI2NTAsIm5iZiI6MTcyMDUyMjM1MCwicGF0aCI6Ii81MjI0NDc2OC8yOTc1MTk4MTUtOWU5MmYxZWEtZDhiNi00ZTE2LTk3Y2YtODQzNTAzNzliYWRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEwNTIzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViODRhZjdhNzQ3MDlhMWRjZjM2NzlkZGE1YzE1MmRjOGJlNjEzZjZkZjFjNGI1ZDI0ZWU4ZThiYjAxNmEzMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.TqpcOwXrCzAp6rHGrEBeLVoGFEn2LceHHfnylbJc8_E)
I believe there's an issue with the mirroring from the first article, and this issue find its way in the next parts as well.
Although you're setting the scrollTop of the mirrored div to the scrollTop of the textarea on
scroll
, it's still going out of sync for some reasons once one or more empty new lines are entered at the bottom of the textarea.Here's a screenshot of the issue:
I just typed a few more "you\n\n"s so that the area gets a scrollbar, and then I scrolled up a bit.
I don't know why this is happening yet, but it's obviously not expected.
I've encountered and reproduced this in my own code too, when I was trying your first article (just doing the mirroring). I just used a
red
color (any color other thantransparent
works as well) instead oftransparent
, and it's in sync on scroll, however, as soon as I entered a newline at the last line, it went out of sync.The text was updated successfully, but these errors were encountered: