Fixed an issue where pgadmin detects the wrong browser version of the Microsoft Edge. Fixes #5465

This commit is contained in:
Yogesh Mahajan 2020-05-29 13:07:02 +05:30 committed by Akshay Joshi
parent ccb39bea1a
commit 4632a7faba
2 changed files with 12 additions and 1 deletions

View File

@ -18,4 +18,5 @@ Bug fixes
*********
| `Issue #5416 <https://redmine.postgresql.org/issues/5416>`_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button.
| `Issue #5465 <https://redmine.postgresql.org/issues/5465>`_ - Fixed an issue where the Edge browser version is showing wrong and warning message gets displayed.
| `Issue #5539 <https://redmine.postgresql.org/issues/5539>`_ - Fixed typo in exception keyword.

View File

@ -565,8 +565,18 @@ def index():
browser_name = 'Chrome'
elif browser == 'firefox' and version < 65:
browser_name = 'Firefox'
elif browser == 'edge' and version < 44:
# comparing EdgeHTML engine version
elif browser == 'edge' and version < 18:
browser_name = 'Edge'
# browser version returned by edge browser is actual EdgeHTML
# engine version. Below code gets actual browser version using
# EdgeHTML version
engine_to_actual_browser_version = {
16: 41,
17: 42,
18: 44
}
version = engine_to_actual_browser_version.get(version, '< 44')
elif browser == 'safari' and version < 12:
browser_name = 'Safari'
elif browser == 'msie':