From debbarr at eastex.net Thu Jul 21 15:08:10 2005 From: debbarr at eastex.net (Debra Donham Barr) Date: Thu Jul 21 15:08:59 2005 Subject: [Needlesearch] Needlearch ignores text in search text box Message-ID: <00ca01c58e27$8bfb0600$98bf8043@homey0155bo3p5> Hey, what am I doing wrong? Initially, Needlesearch works the way I understand it should, by searching for the text I've entered in the text box. But after a few times, it starts to ignore it. Only re-installing fixes it, then only for a short period of tme. Help!!!!! Start a love affair today. Adopt an adult or senior dog. You'll both be glad you did! http://www.rescueeverydog.org/ http://www.srdogs.com/ http://www.1-800-save-a-pet.com/ http://www.petfinder.org/ debb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mozdev.org/pipermail/needlesearch/attachments/20050721/e9abedfc/attachment.htm From rmaraujo at dcc.online.pt Fri Jul 22 03:38:51 2005 From: rmaraujo at dcc.online.pt (Rodrigo Araujo) Date: Thu Jul 21 21:40:09 2005 Subject: [Needlesearch] editor error Message-ID: <42E04E2B.8000407@dcc.online.pt> I found the cause for the editor error in FC distributions and Firefox. FC shipped versions of Firefox have their vendor string set as "Fedora" and NeedleSearch expects it to be "Firefox" to tell it from Mozilla (different DTD locations apply for each browser so NeedleSearch uses editor.xul for FF and editor_moz.xul for Mozilla). Mozilla versions shipped with FC also have navigator.vendor set as "Fedora" so checking it does not seem to be a suitable method for telling one browser from the other. You can check that string by typing "javascript:alert(navigator.vendor);" without quotes in the address bar of your browser. In FC 4 Firefoxes the only string I found to contain "Firefox" is navigator.userAgent. Since that seems to be common to all versions of Firefox (I compared with Windows XP version of FF at least), I suggest the function isFirefox() in file content/needlesearch/jslib/nsSniffer.js becomes something like this: isFirefox : function () { if ( navigator.userAgent != null ) { if (navigator.userAgent.toLowerCase().indexOf("firefox") != -1) { return true; } } if ( navigator.vendor != null ) { if (navigator.vendor.toLowerCase() == "firefox") { return true; } } return false; }, This way it seems safe to me. It does the same checks for undefined strings as before and keeps the old detection method just in case although it seems to be redundant, but one never knows about other "costumized" versions of the browser. You decide if you want to keep the navigator.vendor checks or not ;) Please check with other platform versions of Firefox to confirm this by typing "javascript:alert(navigator.userAgent);" (without quotes) in the address bar and seeing if it contains "Firefox" at some point. If every version does, then it should be safe just to check navigator.userAgent. I'm also attaching a patch against the CVS version of NeedleSearch to introduce this. With this change NeedleSearch works correctly with FC 4 Firefox 1.0.6, FC 3 Firefox 1.0.4, Windows XP Firefox 1.0.4 and FC 4 Mozilla 1.7.8. If you find this patch useful, please commit it to the official branch so the issue is gone in the next release of NeedleSearch :) Best regards, Rodrigo Araujo -------------- next part -------------- A non-text attachment was scrubbed... Name: needlesearch-firefox-detection-bug.patch Type: text/x-patch Size: 861 bytes Desc: not available Url : http://mozdev.org/pipermail/needlesearch/attachments/20050722/a9aaf013/needlesearch-firefox-detection-bug.bin From rmaraujo at dcc.online.pt Fri Jul 22 03:51:19 2005 From: rmaraujo at dcc.online.pt (Rodrigo Araujo) Date: Thu Jul 21 21:52:07 2005 Subject: [Needlesearch] Needlearch ignores text in search text box Message-ID: <42E05117.9010000@dcc.online.pt> >Hey, what am I doing wrong? Initially, Needlesearch works the way I >understand it should, by searching for the text I've entered in the >text box. But after a few times, it starts to ignore it. Only >re-installing fixes it, then only for a short period of tme. Help!!!!! Quite strange. What browser/version and operating system are you using?