@@ -104,8 +104,18 @@ const Finder = Module("finder", {
104
104
* Searches the current buffer for <b>str</b>.
105
105
*
106
106
* @param {string } str The string to find.
107
+ * @see Bug537013 https://bugzilla.mozilla.org/show_bug.cgi?id=537013
107
108
*/
108
- find : function ( str ) {
109
+ find : Services . vc . compare ( Services . appinfo . version , "24.0" ) > 0 ?
110
+ function ( str ) {
111
+ let fastFind = config . browser . getFindBar ( ) ;
112
+ this . _processUserPattern ( str ) ;
113
+ fastFind . _typeAheadCaseSensitive = this . _caseSensitive ;
114
+ fastFind . _typeAheadLinksOnly = this . _linksOnly ;
115
+ let result = fastFind . _find ( str ) ;
116
+ } :
117
+ // FIXME: remove when minVersion > 24
118
+ function ( str ) {
109
119
let fastFind = config . browser . fastFind ;
110
120
111
121
this . _processUserPattern ( str ) ;
@@ -120,8 +130,21 @@ const Finder = Module("finder", {
120
130
*
121
131
* @param {boolean } reverse Whether to search forwards or backwards.
122
132
* @default false
133
+ * @see Bug537013 https://bugzilla.mozilla.org/show_bug.cgi?id=537013
123
134
*/
124
- findAgain : function ( reverse ) {
135
+ findAgain : Services . vc . compare ( Services . appinfo . version , "24.0" ) > 0 ?
136
+ function ( reverse ) {
137
+ let fastFind = config . browser . getFindBar ( ) ;
138
+ if ( fastFind . _findField . value != this . _lastSearchString )
139
+ this . find ( this . _lastSearchString ) ;
140
+
141
+ let backwards = reverse ? ! this . _lastSearchBackwards : this . _lastSearchBackwards ;
142
+ fastFind . _typeAheadLinksOnly = this . _linksOnly ;
143
+ let result = fastFind . _findAgain ( backwards ) ;
144
+ this . _displayFindResult ( result , backwards ) ;
145
+ } :
146
+ // FIXME: remove when minVersion > 24
147
+ function ( reverse ) {
125
148
// This hack is needed to make n/N work with the correct string, if
126
149
// we typed /foo<esc> after the original search. Since searchString is
127
150
// readonly we have to call find() again to update it.
@@ -193,7 +216,9 @@ const Finder = Module("finder", {
193
216
// focus links after searching, so the user can just hit <Enter> another time to follow the link
194
217
// This has to be done async, because the mode reset after onSubmit would
195
218
// clear the focus
196
- let elem = config . browser . fastFind . foundLink ;
219
+ let elem = Services . vc . compare ( Services . appinfo . version , "24.0" ) > 0 ?
220
+ config . browser . getFindBar ( ) . _foundLinkRef . get ( ) :
221
+ config . browser . fastFind . foundLink ; // FIXME: remove when minVersion > 24
197
222
this . setTimeout ( function ( ) {
198
223
if ( elem )
199
224
elem . focus ( ) ;
0 commit comments