0ad1c2767db0eb2c77e14d8ef09ad973b4d04a6d kate Thu Feb 4 14:30:24 2016 -0800 Fix broken parsing of Safari version, so image update (e.g. for drag-zoom) can be used when version supports it. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 0e5dce2..730b4d6 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -36,32 +36,40 @@ imageV2.enabled = (imageV2.imgTbl && imageV2.imgTbl.length > 0); // jQuery load function with stuff to support drag selection in track img if (theClient.isSafari()) { // Safari has the following bug: if we update the hgTracks map dynamically, // the browser ignores the changes (even though if you look in the DOM the changes // are there). So we have to do a full form submission when the user changes // visibility settings or track configuration. // As of 5.0.4 (7533.20.27) this is problem still exists in safari. // As of 5.1 (7534.50) this problem appears to have been fixed - unfortunately, // logs for 7/2011 show vast majority of safari users are pre-5.1 (5.0.5 is by far // the most common). // // Early versions of Chrome had this problem too, but this problem went away // as of Chrome 5.0.335.1 (or possibly earlier). + // + // KRR/JAT 2/2016: + // This Safari issue is likely resolved in all current versions. However the test + // for version had been failing, likely for some time now. + // (As of 9.0.9, possibly earlier, the 3rd part of the version is included in the + // user agent string, so must be accounted for in string match) + // Consequences were that page refresh was used instead of img update (e.g. + // for drag-zoom). And UI dialog was unable to update (e.g. via Apply button). imageV2.mapIsUpdateable = false; - var reg = new RegExp("Version\/([0-9]+.[0-9]+) Safari"); + var reg = new RegExp("Version\/([0-9]+.[0-9]+)(.[0-9]+)? Safari"); var a = reg.exec(navigator.userAgent); if (a && a[1]) { var version = Number(a[1]); if (version >= 5.1) { imageV2.mapIsUpdateable = true; } } } imageV2.inPlaceUpdate = hgTracks.inPlaceUpdate && imageV2.mapIsUpdateable; } } ///////////////////////////////////// ////////// Genomic position ///////// /////////////////////////////////////