Project

General

Profile

Actions

Bug #77719

closed

Autocomplete position is incorrect

Added by Robert Vock about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
t3editor
Target version:
-
Start date:
2016-08-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

The position of the autocomplete is incorrect, if I've scrolled within the editing iframe (I am using Chrome 52.)

This happens because the positioning uses the position of the cursor within the iframe, but does not adjust for the scrollTop of the iframe.

The fix is easy, but I am not sure, if this works for all scenarios:
https://github.com/TYPO3/TYPO3.CMS/blob/096c981961c1804a078ac0ec7f93b54d13bd8efc/typo3/sysext/t3editor/Resources/Public/JavaScript/Plugins/CodeCompletion/TsCodeCompletion.js#L472

toppos = Math.round($cursorNode.position().top + TsCodeCompletion.latestCursorNode.offsetHeight - $cursorNode.scrollTop() - $(TsCodeCompletion.codemirror.frame.contentDocument.body).scrollTop()) + 'px';


Files

t3editor-incorrect-position.png (36.8 KB) t3editor-incorrect-position.png Robert Vock, 2016-08-31 17:05
Actions

Also available in: Atom PDF