IOS support jQuery delegate() instead of live()

chriskuhar wrote on Thursday, December 19, 2013:

We were testing on an iphone and noticed selecting a patient did not work. Investigating I noticed we use jQuery live(), which is depricated, and has known issues with the IOS browser. Replacing live() with delegate() fixes the problem:

diff --git a/interface/main/finder/dynamic_finder.php b/interface/main/finder/dynamic_find
index c46d9d7…0a13170 100644
— a/interface/main/finder/dynamic_finder.php
+++ b/interface/main/finder/dynamic_finder.php
@@ -104,7 +104,8 @@ $(document).ready(function() {
});

// OnClick handler for the rows

  • $(’#pt_table tbody tr’).live(‘click’, function () {
  • $(’#pt_table’).delegate(‘tr’, ‘click’, function () {
    var newpid = this.id.substring(4);

chriskuhar wrote on Friday, December 20, 2013:

I noticed in IOS, if you use the mercury browser, the application is much better behaved:

http://mercury-browser.com/index.html

There is a free version, but for $.99, the full version is available.

For example we were noticing issues with the calendar which are not present with the mercury browser, in IOS.