<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: Frameworks, dfaure.<br />Herald added a project: Frameworks.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D28966">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Due to Qt bug 83605, it's not a good idea to <tt style="background: #ebebeb; font-size: 13px;">setTextCursor</tt> while the cursor<br />
is inside <tt style="background: #ebebeb; font-size: 13px;">beginEditBlock / endEditBlock</tt> (scrollbar might jump to the top),<br />
see KDE bug 195828. It's sufficient to move <tt style="background: #ebebeb; font-size: 13px;">setTextCursor</tt> outside to fix it.<br />
(it's never too late... :)</p>

<p>This patch also adds a test for this case (which currently fails due to<br />
regression, see <a href="https://phabricator.kde.org/D28819" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: line-through;">D28819: [KRichTextEdit] Always treat key press as single modification in undo stack</a> and <a href="https://phabricator.kde.org/D28964" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D28964: [KRichTextWidget] Remove ancient workaround and fix regression (commit 1d1eb6f)</a> for the fix).</p>

<p>BUG: 195828</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Apply <a href="https://phabricator.kde.org/D28964" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D28964: [KRichTextWidget] Remove ancient workaround and fix regression (commit 1d1eb6f)</a></li>
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">ctest</tt></li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>R310 KTextWidgets</div></div></div><br /><div><strong>BRANCH</strong><div><div>dont-scroll-rule (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28966">https://phabricator.kde.org/D28966</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/krichtextedittest.cpp<br />
autotests/krichtextedittest.h<br />
src/widgets/krichtextedit.cpp</div></div></div><br /><div><strong>To: </strong>poboiko, Frameworks, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>