Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a question about the getBoundingRect () function. #1952

Closed
largeden opened this issue May 5, 2017 · 1 comment
Closed

I have a question about the getBoundingRect () function. #1952

largeden opened this issue May 5, 2017 · 1 comment

Comments

@largeden
Copy link
Contributor

@largeden largeden commented May 5, 2017

froala editor version: 2.5.1

editor.position.getBoundingRect().top

On mobile, I can not get the value I want.
This is because editor.helpers.isMobile () returns 0.

  $.FE.MODULES.position = function (editor) {
    /**
    * Get bounding rect around selection.
    *
    */
    function getBoundingRect () {
//...
        boundingRect.top = offset.top - (editor.helpers.isMobile() ? 0 : editor.helpers.scrollTop());

In the past, there were not mobile conditions.

//froala editor version: 2.0.1
boundingRect.top = offset.top - $(editor.original_window).scrollTop();

Is this the intended behavior?

@stefanneculai

This comment has been minimized.

Copy link
Contributor

@stefanneculai stefanneculai commented May 10, 2017

Hi @largeden. Yes, this is the intended behavior and it was added in order to fix some problems with the inline toolbar not showing correctly on mobile devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.