nnhubbard / ZSSRichTextEditor

A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view
MIT License
3.78k stars 585 forks source link

When the keyboard is closed, click the picture, the editor will automatically scroll to the top #139

Open zjh0667 opened 8 years ago

zjh0667 commented 8 years ago

When the keyboard is closed, click the picture, the editor will automatically scroll to the top. When the keyboard is opened, click the picture, the editor will not scroll. How to let it not scroll?

ghost commented 8 years ago

@zjh0667 I have been unable to reproduce this, could you please provide clearer steps for reproducing the issue?

zjh0667 commented 8 years ago

}

Click the picture,it will scroll to top.

pritamd20 commented 8 years ago

Looks like this is due to something in zss_editor.calculateEditorHeightWithCaretPosition = function() { } . I have commeted out the code inside the function and it works. Note : This might have knocked out something else but stops scrolling to top.

zjh0667 commented 8 years ago

@pritamd20 I have commented out the code but it didn't work.The window still will scrolling to the top.If you did not open the keyboard, click the picture will scroll。

ghost commented 8 years ago

@zjh0667 I will have a closer look at this with the code that you have provided, hopefully will have a fix for you within the next few days.

zjh0667 commented 8 years ago

@william205 Can you use WKWebView instead of UIWebView?

ghost commented 8 years ago

@zjh0667 That shouldn't solve this issue however it could still be a good idea to switch to WKWebView due to better performance. I will try to get this done next week along with some other bug fixes and new features/enhancements.

mick20 commented 7 years ago

I also faced this issue, it happenes frequently and seems not easy to solve it

yesiya commented 6 years ago

Anybody has ideas with this issue?