Last modified: 2011-06-13 12:02:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31368, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29368 - jQuery.suggestions.js should skip ajax api calls for empty query strings
jQuery.suggestions.js should skip ajax api calls for empty query strings
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: T. Gries
:
Depends on:
Blocks: 29371
  Show dependency treegraph
 
Reported: 2011-06-13 09:03 UTC by T. Gries
Modified: 2011-06-13 12:02 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description T. Gries 2011-06-13 09:03:17 UTC
during tracking another problem in Vector/modules/ext.vector.simpleSearch.js , I found that jQuery.suggestions.js should be improved.

It currently does not send ajax requests if the current input equals the previous one (this is perfect).
 if ( context.data.$textbox.val() !== context.data.prevText )

But it should skip (i.e. not send) requests, if the input is empty:
 context.data.$textbox.val().length == 0

Regards at least "fetch" and "update" in this module.
Comment 1 T. Gries 2011-06-13 09:04:45 UTC
[UPDATE]
s/should skip/should also skip/
Comment 2 T. Gries 2011-06-13 09:39:00 UTC
fixed in r89951

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links