Bug 59053 - REGRESSION (r83386): Typing in WSJ.com search field doesn't clear placeholder text
Summary: REGRESSION (r83386): Typing in WSJ.com search field doesn't clear placeholder...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Major
Assignee: Nobody
URL:
Keywords: InRadar
: 59685 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-20 17:52 PDT by Adele Peterson
Modified: 2011-05-01 07:15 PDT (History)
6 users (show)

See Also:


Attachments
Beautified WSJ script that contains misbehaving code. (640.38 KB, application/x-javascript)
2011-04-21 10:09 PDT, Dimitri Glazkov (Google)
no flags Details
Patch (4.57 KB, patch)
2011-04-21 16:24 PDT, Dimitri Glazkov (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adele Peterson 2011-04-20 17:52:47 PDT
Typing in WSJ.com search field doesn't clear placeholder text

Bisecting indicates this was caused by http://trac.webkit.org/changeset/84039

Steps to reproduce:
- Go to http://www.wsj.com
- Click in the search field on the upper right, with the placeholder text "News, Quotes, Companies, Videos" (I don't think this is a placeholder attribute)
- type

It should clear the placeholder text.
Comment 1 Adele Peterson 2011-04-20 17:53:26 PDT
<rdar://problem/9305025>
Comment 2 mitz 2011-04-20 21:13:54 PDT
(In reply to comment #0)
> (I don't think this is a placeholder attribute)

It is not.
Comment 3 Dimitri Glazkov (Google) 2011-04-20 21:22:01 PDT
I am having trouble reproducing. I am on Version 5.0.4 (6533.20.27, r84360). Click on the search field immediately clears the placeholder text. Is this what should be happening?
Comment 4 Adele Peterson 2011-04-20 21:25:22 PDT
I can get this to work sometimes, but most of the time it fails.  When it fails, if I click over "Quotes", I end up entering text in the middle of that word.
Comment 5 Dimitri Glazkov (Google) 2011-04-21 07:52:04 PDT
(In reply to comment #4)
> I can get this to work sometimes, but most of the time it fails.  When it fails, if I click over "Quotes", I end up entering text in the middle of that word.

Morrita-san and I will try to repro again today. It would be great to have a better reduction.

The revision you mentioned looks rather doubtful to be the culprit in any of this, since the WSJ site doesn't travel any of the affected code. They don't use <summary>/<details>.
Comment 6 Dimitri Glazkov (Google) 2011-04-21 10:08:59 PDT
I think this bug has more to do with the racing in loading of scripts. According to the code in http://sj.wsj.net/djscript/bucket/NA_WSJ/page/0_0_WH_0001_public/provided/j_global_slim/version/20110419230428.js:

1) focus event triggers loading of http://s.wsj.net/djscript/j_networkHat-201134.js
2) when the script is loaded, a function "searchFieldOnFocus" from this script is called
3) the function clears the value of the input.

Since I can't reproduce the bug in Chromium or WebKit nightly, I can't tell exactly where this chain breaks down, but it's definitely not the r84039.
Comment 7 Dimitri Glazkov (Google) 2011-04-21 10:09:49 PDT
Created attachment 90551 [details]
Beautified WSJ script that contains misbehaving code.
Comment 8 mitz 2011-04-21 10:20:44 PDT
Thanks. I was now able to reproduce the bug with a build of a revision earlier than r84039.
Comment 9 mitz 2011-04-21 10:29:17 PDT
Further testing suggests that this was caused by r83386.
Comment 10 Dimitri Glazkov (Google) 2011-04-21 10:34:01 PDT
(In reply to comment #9)
> Further testing suggests that this was caused by r83386.

Ha! Still me :)

Are you using just standard WebKit nightly and Safari 5 on Snow Leopard or some other magic thing to repro this? I am flying blind, since I can't repro locally.
Comment 11 Dimitri Glazkov (Google) 2011-04-21 11:23:54 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > Further testing suggests that this was caused by r83386.
> 
> Ha! Still me :)
> 
> Are you using just standard WebKit nightly and Safari 5 on Snow Leopard or some other magic thing to repro this? I am flying blind, since I can't repro locally.

I am able to reproduce now. The trick is to rest the cursor over the search box a bit before clicking.
Comment 12 Dimitri Glazkov (Google) 2011-04-21 11:37:31 PDT
I am a bad boy. Fix coming up.
Comment 13 Dimitri Glazkov (Google) 2011-04-21 16:24:34 PDT
Created attachment 90629 [details]
Patch
Comment 14 WebKit Commit Bot 2011-04-21 19:01:45 PDT
Comment on attachment 90629 [details]
Patch

Clearing flags on attachment: 90629

Committed r84587: <http://trac.webkit.org/changeset/84587>
Comment 15 WebKit Commit Bot 2011-04-21 19:01:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Dimitri Glazkov (Google) 2011-05-01 07:15:32 PDT
*** Bug 59685 has been marked as a duplicate of this bug. ***