fancybox icon indicating copy to clipboard operation
fancybox copied to clipboard

Text is reset in my textarea

Open dizelvis opened this issue 5 years ago • 1 comments

Hello! I ask for help. I did a custom scan on this sample https://codepen.io/fancyapps/full/zPZeKb

Instead of text, I added a textarea. Now if I change the text in the field, then scrolling to the next photo and returning to the original one, the text is reset - it becomes the same as it was originally. I tried to assign it via javascript, but this did not work. Please, help!

dizelvis avatar Apr 22 '20 13:04 dizelvis

It was not easy, but I solved my question. Maybe someone will come in handy. For textarea, I set the change event onclick. Change function calls

$.fancybox.getInstance().current.opts.caption = 'new caption'; $.fancybox.getInstance().updateControls();

dizelvis avatar Apr 22 '20 14:04 dizelvis