Wysiwyg-editor: android chrome hit the Enter/Delete key will scroll to top of page.

Created on 10 Jul 2018  路  7Comments  路  Source: froala/wysiwyg-editor

Expected behavior.

android chrome click delete of the keyboard,the page no scroll to top

Actual behavior.

android chrome click delete of the keyboard,the page will scroll to top

Steps to reproduce the problem.

1.type long article
2.then delete
3.back to top
froala version 2.8.4

OS.

android chrome

Browser.

chrome simulator

bug

Most helpful comment

@stefanneculai Some problem, xiaomi mi5s https://www.youtube.com/watch?v=YB84-Pxcmc8

All 7 comments

@HereSinceres are you seeing this on a real device or only Chrome Simulator? Based on our experience, the Chrome Simulator doesn't replicate correctly the real device.

https://www.froala.com/wysiwyg-editor
android chrome
Steps to reproduce the problem.
1.type long article
2.then delete
3.back to top
froala version 2.8.4

@HereSinceres could you please let us know what mobile device are you using?

@stefanneculai Some problem, xiaomi mi5s https://www.youtube.com/watch?v=YB84-Pxcmc8

Got the same behavior with version 2.8.5:
if (e && !l.helpers.isIOS() && (e.which == M.FE.KEYCODE.ENTER || e.which == M.FE.KEYCODE.BACKSPACE || 37 <= e.which && e.which <= 40 && !l.browser.msie)) try { s() } catch (n) {}

The s() method calls $(window).scrollTo(...) inside:
M(l.o_win).scrollTop(e + l.helpers.scrollTop() - l.$tb.height() - 20)

hi @stefanneculai

I suspect that this issue is due to improvements in the issues below.

https://github.com/froala/wysiwyg-editor/issues/2573

function positionCaret () {
//...
  if (info < editor.$tb.height() + 20 && info >= 0) {
    $(editor.o_win).scrollTop(info + editor.helpers.scrollTop() - editor.$tb.height() - 20);
  }
//...
}

I think the issue is happening because the info> = 0 code has been removed.

We're going to review and try to fix in the release 2.8.7.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Krisell picture Krisell  路  3Comments

cristianst picture cristianst  路  4Comments

Nucs picture Nucs  路  4Comments

studiotemple picture studiotemple  路  3Comments

horatiua picture horatiua  路  4Comments