We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    The internal branch requires internal access. Once merged to the external public trunk, you should just be able to replace the assets/modules/quick_edit folder with that one.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 26693
      • 23 Posts
      Thanks for the clarity Ryan!

      Kyle, found the js debugger for safari and have been logging a few things, the debugger is nowhere near as comprehensive as the firebug tool but its a place to start from. Also just downloaded the nightly version of webkit (development version of safari), so that has yielded some interesting results too.

      Using the compressed ajaxsearch.js in Sarafi 2.0.4 you get a simple Null Value error -line 1, on load of the page. The console add a tiny bit extra to this, it says (timer):Null Value.

      When you run a search you get ’Value undefined (result of expression imgElement.getStyle) is not an object’ - line 1.

      The main trouble with this is it doesn’t tell me which file is causing these errors.


      Using the uncompressed AjaxSearch.js you get the same results for the first error, exactly the same, no file mentioned so when i double click it can’t open the file and highlight where the error is coming from. This is with compressed mootools, using the full undocumented mootools v1 it attributed the null value error to line 534, but no source file. The only file im using that has that many lines is mootools, changing the only null value in AjaxSearch.js to a number didnt change the error message at all.


      The second error however does tell me that it’s being caused by line 170 in AjaxSearch.js
      imgStyle=imgElement.getStyle('display')


      The js debugger in normal safari doesnt give away much more than that, the webkit debugger is fantastic tho. The only problem is that the error doesn’t occur in Webkit at all and can’t as such be dubugged by the nice tool. Search works perfectly in webkit.
        • 15987
        • 786 Posts
        seraji, thanks for helping to dig into this problem. GarryN found the following about it:


        Hi all, the issue with the throbber and close box appears to be a bug in Safari, as highlighted here: http://snook.ca/archives/javascript/safari2_display-none_getcomputedstyle/

        getComputedStyle() is used in the mootools getStyle() function. Of course, I only found this link after banging my head against a wall for about 2 hours so I haven’t had time to look into a workaround yet.

        so that is somewhere to start.
          • 26693
          • 23 Posts
          Made some changes and got it to work in all browsers that i can get my hands on. Safari, Webkit, FF(mac + win), IE7 are all fine. The rendering of opacity without backgrounds on elements in IE 6 is terrible, so to get things to look nice a background will have to be set on the text itself.

          Because Safari cannot currently change any styles when display:none is on an object you have to use another method to make them vanish, apparently it doesn’t like visibility much either so i went with opacity. A ticket was filed http://dev.mootools.net/ticket/51 with this exact problem a few hours ago and is patchable within mootools iself, safari is updated very regularly and as the dev version no longer has this bug it will be gone soon from the release version.

          Basically I changed all references from display to opacity within AjaxSearch.js and the snippet itself and it sorted things out, I’ve only changed the ajax part of the search as i have yet to seen the non-ajax version on the go and am uncertain of whether it works or not. I believe it displays the results on a separate page and will not be using js to swap things in and out of display.

          Boss is calling me to do some work now, let me know how these work for you.

          Edit: Included in the zip are the files i edited, not all the files included in the original version 1.6
            • 25663 MODX Staff
            • 12,272 Posts
            THanks Seraji ... it’s really close! The throbber is displayed at all times, and the "x" close image never appears. But Safari is finally returning results like it’s better-behaved browser brethren!
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 15987
              • 786 Posts
              seraji,
              great news! I will give it a look over today and see how things look. thanks a lot for your help on this.

              Kyle
                • 26693
                • 23 Posts
                No problem guys, always willing to lend a hand when I can.

                Having trouble getting the results that Ryan is describing as on the mac I have here everything seems fine now, I was at first using no styling at all other than what the js applied to the search, using the default style in the readme it seems ok too. Possible that some other styles are being inherited causing stuff to display / remain hidden, or possible that my on-the-fly programming skills are slightly lacking in finesse wink



                  • 25663 MODX Staff
                  • 12,272 Posts
                  Seraji ... take a peek here: http://collabpad.com/search-test.html
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 26693
                    • 23 Posts
                    <form id="ajaxSearch_form" action="index.php?id=88" method="post">
                    			<label for="ajaxSearch_input">
                    				<input id="ajaxSearch_input" type="text" name="search" value="Search here..." onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" />
                    			</label>
                    			<label for="ajaxSearch_submit">
                    
                    				<input id="ajaxSearch_submit" type="submit" name="sub" value="Go!" />
                    			</label>
                    		</form>


                    thats from my search page source code

                    <form id="ajaxSearch_form" action="search-test.html" method="post">
                    			<label for="ajaxSearch_input">
                    				<input id="ajaxSearch_input" type="text" name="search" value="Search here..." onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" />
                    
                    			</label>
                    			<label for="ajaxSearch_submit">
                    				<input id="ajaxSearch_submit" type="submit" name="sub" value="Go!" />
                    			</label>
                    			<img src="assets/snippets/AjaxSearch/images/indicator.white.gif" alt="loading" id="indicator" />
                    			<img src="assets/snippets/AjaxSearch/images/cross.png" alt="close search" id="searchClose" />
                    		</form>


                    thats from yours, mine even after i search doesn’t include the image calls in the code itself unless i highlight them and ’view selection source’ directly. Have you modified the template include or anything to change the way the images are called in? Or is this straight from 1.6 -> my changes?
                      • 15987
                      • 786 Posts
                      Ryan,
                      you need to update the template.inc.php file. When we were testing the other night we hard coded the images in there.

                      Seraji,
                      Your code looks good, the only issue I had was with IE6 and the need for a background color on the results. It sure looks bad without it.

                      thanks again.

                      Kyle