Last modified: 2014-02-12 23:52:44 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 T43669, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41669 - document.getElementById("results") is null
document.getElementById("results") is null
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Jon
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-02 00:09 UTC by Max Semenik
Modified: 2014-02-12 23:52 UTC (History)
10 users (show)

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


Attachments

Description Max Semenik 2012-11-02 00:09:37 UTC
On index.php?title=Special:MobileOptions&returnto=Main+Page

Latest Firefox, no matter if beta is enabled or not.

function init() {
  enhanceElements();
  if( document.activeElement && document.activeElement.id === 'search' ) {
    onfocus();
  }
  function hideKeyboard() {
    document.getElementById( 'search' ).blur();
  }
  document.getElementById( 'results' ).ontouchstart = hideKeyboard; <-- here
  printMessage( message( 'mobile-frontend-search-help' ) );
  initClearSearch();
Comment 1 Jon 2012-11-02 00:26:56 UTC
Makes sense. Good catch!
We've removed search from the overlay pages. This would also apply to login page.

The solution would be to update javascript mf-search.js to conditionally check for this. Will look into it tomorrow.
Comment 2 Jon 2012-11-02 23:52:11 UTC
https://gerrit.wikimedia.org/r/31586
Comment 3 Arthur Richards 2012-11-06 00:12:13 UTC
The fix actually had the effect of breaking search suggestions (dunno how I missed that during review.... stupid oversight). It looks like it's because you were doing document.getElementById( 'search' ), but that element doesn't seem to ever exist. This seems to resolve the problem:
https://gerrit.wikimedia.org/r/#/c/31964/

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


Navigation
Links