Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, 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: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 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: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuMessage left position

Unread post by admin »

.
Locked