znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
335 stars 82 forks source link

Fixed Popup profile positioning. #434

Closed pboguslawski closed 11 months ago

pboguslawski commented 1 year ago

Proposed change

Popup profile top, left, width and height parameter values should be interpreted by JS as numbers not strings (left popup value was contcatenation not sum of window.screen.left and PopupProfiles[PopupProfile].Left and was producing wrong popup positioning).

Popup positioning on dual monitor setup in Firefox was broken because screenX returns position on spanned screen not current screen and according to

https://developer.mozilla.org/en-US/docs/Web/API/Screen/top https://developer.mozilla.org/en-US/docs/Web/API/Screen/left

window.screen.top and window.screen.left are non-standard/obsolete and should be avoided.

This fixes these positioning problems.

There is no point in displaying Popup Profile in agent preferences by default (may be helpful for debugging only) because it's now automatically updated on popup resize so it's hidden now by default.

Type of change

Additional information

Fixes: a20eddf94b64dc30ecf92910fb7bc4b16c4cf612 Related: https://github.com/znuny/Znuny/issues/432 Author-Change-Id: IB#1133822

Checklist