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. #432

Closed pboguslawski closed 11 months ago

pboguslawski commented 1 year ago

Environment

Expected behaviour

(1) Popup positioning parameters should work ok, even in Firefox + dual-monitor setups.

(2) Popup Profile should not be present in agent preferences by default.

(3) All 4 positioning params should be set in one post not 4 separate posts.

(4) dev and rel-7 should provide same feature

Actual behaviour

Popup profile top, left, width and height parameter values are be interpreted by JS as strings and are concatenated with + not summarized.

Popup positioning on dual monitor setup in Firefox is 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.

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.

How to reproduce

Try resizing popup window in dual-monitor setup in Firefox, then refresh page and try to open popup again. Position will differ.

Additional information

dennykorsukewitz commented 11 months ago

Fixed in