You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Znuny version: 7.1.13 (problem exists since Aug 2, 2023)
Expected behavior
When loading a page, the popup profile in the system configuration should determine the correct size of the popup window, if the user never changes to popup size manually.
Actual behavior
For new agents, or agents that never changes the popup size manually, the default values for popup size and position don't work.
The configuration Frontend::PopupProfiles###001-Framework contains sizes with '%' and 'px'.
When those are used in the javascript, it is first checked if the content is a number PopupProfiles[PopupProfile].Width = Number(PopupProfiles[PopupProfile].Width); this has been done by the PR #433. This is in conflict with the prior change from commit# a37e327. Here, the configuration added '%' and 'px' to the Profile and a RegEx check for those characters. But this is done after the content is checked for being a number.
After the popup size is changes manually, the user_preferences table contains new values without strings, so it is correctly interpreted as pixel (which also only makes sense if the agent always works on the same/similar monitor. This has nothing to do with this bug, but maybe this could be improved in the future)
How to reproduce
Steps to reproduce the behavior:
Create a new user (or delete the popup preferences of an existing user from the user_preferences table)
Open Agent TicketZoom and paste Core.UI.Popup.ProfileList() into the console. You will see the default profile with values containing '%' and 'px'.
Open any Popup and close is again. Still in AgentTicketZoom, without reloading, execute Core.UI.Popup.ProfileList() again.
You will see, that all entries now contain NaN as values.
Screenshots
The text was updated successfully, but these errors were encountered:
Environment
Expected behavior
When loading a page, the popup profile in the system configuration should determine the correct size of the popup window, if the user never changes to popup size manually.
Actual behavior
For new agents, or agents that never changes the popup size manually, the default values for popup size and position don't work.
The configuration
Frontend::PopupProfiles###001-Framework
contains sizes with '%' and 'px'.When those are used in the javascript, it is first checked if the content is a number
PopupProfiles[PopupProfile].Width = Number(PopupProfiles[PopupProfile].Width);
this has been done by the PR #433. This is in conflict with the prior change from commit# a37e327. Here, the configuration added '%' and 'px' to the Profile and a RegEx check for those characters. But this is done after the content is checked for being a number.After the popup size is changes manually, the user_preferences table contains new values without strings, so it is correctly interpreted as pixel (which also only makes sense if the agent always works on the same/similar monitor. This has nothing to do with this bug, but maybe this could be improved in the future)
How to reproduce
Steps to reproduce the behavior:
Core.UI.Popup.ProfileList()
into the console. You will see the default profile with values containing '%' and 'px'.Core.UI.Popup.ProfileList()
again.Screenshots
The text was updated successfully, but these errors were encountered: