Hi,
Please find updated patch.
On Tue, Jul 11, 2017 at 4:52 PM, Murtuza Zabuawala <
[email protected]> wrote:
> Please disregard previous patch, I'll send updated patch as I found one
> issue.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Tue, Jul 11, 2017 at 4:49 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA minor patch to fix the issue in privileges control, where privileges
>> were not displaying in IE10/11 when user click on it to grant privileges
>> for given role.
>> RM#1166
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/privilege.js
b/web/pgadmin/browser/server_groups/servers/static/js/privilege.js
index e89fdbf..654884c 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/privilege.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/privilege.js
@@ -627,7 +627,16 @@
* focused active element.
*/
setTimeout(function() {
- if (self.$el[0] != document.activeElement &&
!isDescendant(self.$el[0], document.activeElement)){
+ /*
+ Do not close the control if user clicks outside dialog window,
+ only close the row if user clicks on add button or on another row, if
user
+ clicks somewhere else then we will get tagName as 'BODY' or 'WINDOW'
+ */
+ var is_active_element = document.activeElement.tagName == 'DIV' ||
+ document.activeElement.tagName == 'BUTTON';
+
+ if (is_active_element && self.$el[0] != document.activeElement &&
+ !isDescendant(self.$el[0], document.activeElement)) {
var m = self.model;
m.trigger('backgrid:edited', m, self.column, new
Backgrid.Command(ev));
}},10);