Closed Bug 1139747 Opened 9 years ago Closed 6 years ago

johnlewis.com prevents users from writing in search field in some browsers

Categories

(Web Compatibility :: Site Reports, defect, P5)

Other
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: hsteen, Unassigned)

References

()

Details

(Whiteboard: [mobile-compat-form] [contactready] [country-uk] [js])

Site: http://m.johnlewis.com/mt/www.johnlewis.com/#page_loaded
johnlewis.com prevents users from writing in search field in some browsers

:: Steps To Reproduce

If you focus the search field on this page in Firefox on Android, the on-screen keyboard appears but almost instantly disappears again.

Below is some technical analysis. Please share this with your web developer or web agency:

The reason for this problem is a JavaScript that calls the blur() method on the box you intend to type in.

This is the code that causes the problem:

    var b = d('*:focus'),
    g = window.innerHeight + 200,
    j = (new Date) .getTime();
    u ? (clearInterval(u), u = null)  : (h = !1, b.length && !l.isIE10 && (l.isAndroid2 ? setTimeout(function () {
      b[0].focus()
    }, 300)  : (b[0].blur(), setTimeout(function () {
      h =
      !0
    }, 300))), d('body') .css({
      'min-height': g + 'px'
    }), !l.isAndroid2 && !l.isIE10 && window.scrollTo(0, 1), u = setInterval(function () {
      var b = (new Date) .getTime();
      if (parseInt(document.body.clientHeight) >= g && 0 < document.body.scrollTop || 1000 < b - j) clearInterval(u),
      u = null,
      l.isAndroid || l.isIE10 ? setTimeout(q, 300)  : q()
    }, 100))

in a file named ufx.js

Comments say 
"Copyright Usablenet Inc. 2012-2013
@author Marco Brondani"

I haven't seen this ufx code before, I think - it might by coincidence also run on the lottery site, but we shouldn't bet on it. You could try to use developer tools' debugger's search feature :-)

:: Expected Result

Search

:: Actual Result

disappearing keyboard

:: Additional Information

Software Version: 2.0
Reporter's User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Whiteboard: [mobile-compat-form] → [mobile-compat-form] [contactready] [country-uk] [js]
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 961460
Priority: -- → P5
The Firefox OS project is not active anymore.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.