We are getting weird behaviour with autocomplete popup sitting behind skuid popup (normal dialog popup). We tried setting z-index property for autocomplete popup and it works first time and if you search again problem reappears. While inspecting element for z-index property of skuid popup and autocomplete popup we found that z-index property of skuid popup is increasing dynamically so as to make it more than z-index of autocomplete popup (i.e. if I set z-index of autocomplete popup to 105, skuid popup’s z-index will be automatically set to 106).
The problem occurs rarely on normal reference field. However, it happens almost all the times when we use custom field renderer (which is polymorphic in nature i.e. it can search different records such as account, Contact, Service__c etc).
Any clues?
Page 1 / 1
It’s the jQueryUI dialog that is always fighting for the highest z-index. It basically looks for the z-index of all of the dom elements that match the $(‘.ui-front’) selector and makes its z-index one higher. In our reference renderer we just escalate this with the following code. You could probably do something similar.
input.focus(function(){<br />// Fix a bug where the autocomplete could show up behind dialogs.<br />input.autocomplete('widget').css('z-index',parseInt(input.closest('.ui-front').css('z-index'),10)+1);<br />});
Thanks Ben, It worked!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.