fix a pinning functionality
chrome still have problem
fixes #1; adapt for dynamically opened textarea