Jump to content

[Login Background] Rendering diff between Internet browsers


mterceno

Recommended Posts

Hi all,

 

I can't to resolve the following problem.

 

I set a login background in my application et the rendering in Firefox is not good. I attach a print screen which compares the rendering between Opera & Firefox.

 

Chrome & Edge work like Opera.

 

 

The background size is not same in Firefox. It seems repeat himself...

 

Do you have an idea to solve this problem ?

 

Best regards

post-4662-0-52755200-1492763480_thumb.png

Link to comment
Share on other sites

Hi,

 

It seems that FF has a problem with:

background-size: cover;

Can you try this approach for now (maybe it's not the best solution at the moment)?!:

 

1. UniLoginForm1 -> Script:

Ext.onReady(function() {
    document.body.onresize = function() {
        var clW = document.body.scrollWidth;
        var clH = document.body.scrollHeight;
        var values = clW + 'px ' + clH + 'px';
        document.body.style.backgroundSize = values;

    }
});

2. UniLoginForm1 -> ClientEvents -> ExtEvents -> Ext.window.Window [window] ->

function window.deactivate(sender, eOpts)
{
    document.body.onresize();
}
function window.move(sender, x, y, eOpts)
{
    document.body.onresize();
}
function window.resize(sender, width, height, oldWidth, oldHeight, eOpts)
{
    document.body.onresize();
}

Best regards,

Link to comment
Share on other sites

  • 9 months later...

I resolved like this

 

Work FF and other browser

procedure TfrmLogin.UniLoginFormCreate(Sender: TObject);
begin
   UniSession.AddJS('document.body.style.background = ''url("/files/bg.jpg") no-repeat center center fixed''');
   UniSession.AddJS('document.body.style.backgroundSize = "cover";');
end;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...