Wysiwyg-editor: Wrong toolbar position with multiline text

Created on 19 Oct 2016  路  4Comments  路  Source: froala/wysiwyg-editor

Expected behavior.

The toolbar position should appear above the selected text (as usual)

Actual behavior.

The toolbar position is wrong. In this case it is centered.

Steps to reproduce the problem.
  1. https://jsfiddle.net/124c4cqp/13/
  2. Write some multi line text (breaklines)
  3. Select Text
  4. See toolbar position

image

OS.

OSX El Capitan v 10.11.2

Browser.

Google Chrome Version 53.0.2785.143 (64-bit)

enhancement wontfix

Most helpful comment

Why is this an enhancement?
According to the definition of bug :

A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

Source: https://en.wikipedia.org/wiki/Software_bug

This seems to bee a bug IMO since the toolbar appears in a completely wrong position, as a user I expect the toolbar to appear above or below the selected text (its a inline toolbar after all).

All 4 comments

You can also reproduce this behaviour in your page https://www.froala.com/wysiwyg-editor/inline

But first remove the container div with the class text-center that forces the centered alignment.
or align the text to the left.

image

Why is this an enhancement?
According to the definition of bug :

A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

Source: https://en.wikipedia.org/wiki/Software_bug

This seems to bee a bug IMO since the toolbar appears in a completely wrong position, as a user I expect the toolbar to appear above or below the selected text (its a inline toolbar after all).

We consider it an enhancement because the browser returns the selection as being from side to side when using clientBoundingRect for the selection object: https://developer.mozilla.org/en/docs/Web/API/Element/getBoundingClientRect.

Unfortunately, this will remain as a wontfix. We are using getBoundingClientRect method (https://developer.mozilla.org/en/docs/Web/API/Element/getBoundingClientRect) which it appears is returning a wrong attribute. We'll investigate further what is causing that in browsers and report this to Chrome/Mozilla.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isubasti picture isubasti  路  4Comments

homoky picture homoky  路  3Comments

rogersteblerbsi picture rogersteblerbsi  路  3Comments

jmsche picture jmsche  路  3Comments

thedotedge picture thedotedge  路  4Comments