Bug 141230 - cannot type text into boxes on riteaid.com
Summary: cannot type text into boxes on riteaid.com
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-05 19:16 UTC by ndeb
Modified: 2007-09-12 22:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
testcase (606 bytes, application/xhtml+xml)
2007-02-05 22:43 UTC, Stefan Monov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ndeb 2007-02-05 19:16:30 UTC
Version:           3.5.4 (using KDE 3.5.4, compiled sources)
Compiler:          Target: i586-mandriva-linux-gnu
OS:                Linux (i686) release 2.6.17.13-mm-laptop-3mdvsmp

Go to http://www.riteaid.com/stores/locator/

1) The page shows several boxes into which you can type text information. However, when you type, the text does not appear in the box.

2) Some of the boxes (like Zip code) are not even displayed.

Firefox-1.5.0.9 does not have any of these problems.
Comment 1 Philip Rodrigues 2007-02-05 20:42:00 UTC
I get the same problem on that site, although the zip code box is shown. Downloading the page makes it work, so I guess it's some external js or something?
Comment 2 Stefan Monov 2007-02-05 22:43:16 UTC
the zip code box is shown here too, KDE 3.5.6.
Comment 3 Stefan Monov 2007-02-05 22:43:19 UTC
Created attachment 19562 [details]
testcase

alas, references an external script. boy, i'm not diving into that
hxclient_v3.js JSF-generated monstrosity! :-o
in short, if this bug is ever to be identified, reporter would need to provide
a cut down version of that script.
Comment 4 ndeb 2007-02-06 08:53:16 UTC
KDE-3.5.6 does show the zip code box but does not let text to be typed.

The test case in comment 3 does not prevent text from being typed into the box so its not a test case at all. 

What is the path of the hxclient_v3.js file?
Comment 5 Stefan Monov 2007-02-06 09:52:16 UTC
Yeah, ok, then I forgot to mention...
In my testcase, as in riteaid.com, it is possible to enter text _immediately_ after the fields are visible. However, after some seconds (seem to vary between 7 and 20) the page snaps (meaning the tab and statusbar flicker a bit, and sometimes the statusbar changes to "loaded" even though it seems to already have loaded earlier) and it's no longer possible to change the contents of the field - as the JS intercepts and "handles" all keypresses in there.
Of course, manipulation by mouse (like pasting) works.
Comment 6 Stefan Monov 2007-02-06 09:53:06 UTC
oh, and the path is http://www.riteaid.com/.ibmjsfres/hxclient_v3.js
Comment 7 ndeb 2007-06-17 20:57:46 UTC
Same problem in kde-3.5.7.
Comment 8 Maksim Orlovich 2007-06-17 21:36:55 UTC
This fixes the typing:

--- ecma/kjs_events.cpp (revision 671589)
+++ ecma/kjs_events.cpp (working copy)
@@ -286,7 +286,8 @@
   case TimeStamp:
     return Number((long unsigned int)event.timeStamp()); // ### long long ?
   case ReturnValue: // MSIE extension
-    return Boolean(event.handle()->defaultPrevented());
+    // return false == cancel, so this returns the -opposite- of defaultPrevented
+    return Boolean(!event.handle()->defaultPrevented());
   case CancelBubble: // MSIE extension
     return Boolean(event.handle()->propagationStopped());
   default:

(But the form doesn't do anything useful afterwards, not sure why)
Comment 9 Maksim Orlovich 2007-06-17 22:11:17 UTC
Oh, never mind that 2nd part, that's just because I had cookies disabled
Comment 10 Maksim Orlovich 2007-06-30 16:15:13 UTC
SVN commit 681861 by orlovich:

Properly emulate getting of returnValue. Fixes typing in input boxes on store locator on riteaid.com
CCBUG:141230


 M  +2 -1      kjs_events.cpp  


--- branches/KDE/3.5/kdelibs/khtml/ecma/kjs_events.cpp #681860:681861
@@ -286,7 +286,8 @@
   case TimeStamp:
     return Number((long unsigned int)event.timeStamp()); // ### long long ?
   case ReturnValue: // MSIE extension
-    return Boolean(event.handle()->defaultPrevented());
+    // return false == cancel, so this returns the -opposite- of defaultPrevented
+    return Boolean(!event.handle()->defaultPrevented());
   case CancelBubble: // MSIE extension
     return Boolean(event.handle()->propagationStopped());
   default:
Comment 11 Maksim Orlovich 2007-06-30 16:17:29 UTC
SVN commit 681862 by orlovich:

Regression test for #141230, get of .returnValue
CCBUG:141230


 A             baseline/events/141230.html-dom  
 AM            baseline/events/141230.html-dump.png  
 A             baseline/events/141230.html-render  
 A             tests/events/141230.html  


** branches/khtml/khtmltests-3.5/regression/baseline/events/141230.html-dump.png #property svn:mime-type
   + image/png
Comment 12 Stefan Monov 2007-09-12 11:13:37 UTC
Funnily enough, trunk now allows typing in my testcase, but still not in the riteaid site... :)
Comment 13 Maksim Orlovich 2007-09-12 16:09:40 UTC
Note that I didn't forward-port this to trunk yet.
Comment 14 Maksim Orlovich 2007-09-12 16:38:11 UTC
SVN commit 711658 by orlovich:

Forwardport regression tests for #141230
CCBUG:141230


 A             baseline/events/141230.html-dom   branches/khtml/khtmltests-3.5/regression/baseline/events/141230.html-dom#681862
 A             baseline/events/141230.html-dump.png   branches/khtml/khtmltests-3.5/regression/baseline/events/141230.html-dump.png#681862
 A             baseline/events/141230.html-render   branches/khtml/khtmltests-3.5/regression/baseline/events/141230.html-render#681862
 A             tests/events/141230.html   branches/khtml/khtmltests-3.5/regression/tests/events/141230.html#681862


WebSVN link: http://websvn.kde.org/?view=rev&revision=711658
Comment 15 Maksim Orlovich 2007-09-12 16:50:32 UTC
SVN commit 711671 by orlovich:

Forwardport fix for #141230
BUG:141230


 M  +2 -1      kjs_events.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=711671
Comment 16 Stefan Monov 2007-09-12 22:59:35 UTC
Yup now it's fixed in trunk too.