Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuMessage left position

Questions related to using nuBuilder Forte.
Locked
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

nuMessage left position

Unread post by toms »

Hi,

Messages shown with nuMessage() appear too much to the right of the screen or even outside the visible bounds of the document under these circumstances:

- if the browser is not full size
- If the developer console is visible (left or right docked)
- if the taskbar is not at the bottom of the screen but left or right docked

It looks like this, the message only becomes visible if you scroll to the right:
offscreen.png
Fix for nuform.js, function nuMessage(), to center the message within the html document (and not the screen)

Replace this line

Code: Select all

var l		= (screen.width - widest) / 2;
With this line:

Code: Select all

var l		= ($(document).width() - widest) / 2;
After applying the fix, the message box is centered:
centered.png
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuMessage left position

Unread post by admin »

toms,

Nice Fix!

It's now on Github

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuMessage left position

Unread post by toms »

Thanks!
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuMessage left position

Unread post by admin »

.
Locked