Bug Tracker

Current Project: Guriddo jqGrid JS

Issue ID# 24 Close multiple popup window
Status: New Version: 4.8 Priority: 3
Assigned to: Submitted by: Zue Attached file:
Type: Bug Submitted:
2017-07-18 08:53:01 UTC
Last Update:
Description: Hello,
We found a issue about clode the multiple popup window in same page.
We using jqmShow() to popup first div window in our website, and the second div popup in the first div window. If click the element with jqmClose class to close the second div window, but not jqmHide(). The first div window and second div window will both close. Even if popup the third window will have same problem.

We think fix the issue but not sure will effect other part or not.
As following, the code after // is the original code, and after original code is fixed code.

Original code:
//hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() {
//if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1}){for(var s in this[i]){if(H[this[i][s]]){H[this[i][s]].w[i](this);}}}return F;});}

Fixed code:
hs = function (w, t, c) {
return w.each(function () {
var s = this._jqm; $(t).each(function () {
if (!this[c]) { this[c] = []; $(this).click(function () { for (var i in { jqmShow: 1, jqmHide: 1 }) for (var s in this[i]) { } if (H[this[i][s]]) H[this[i][s]].w[i](this); return F; }); } this[c].push(s);

Stay connected with us in your favorite flavor!