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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...