Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
javascript
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2006 at 23:21 UTC
Updated:
12 Jan 2007 at 07:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
AjK commentedI found an easier way to reproduce this. As a node administrator, edit a node. In the "Authoring information" section the "Authored by" field is an "autocomplete" type textfield.
Just keep hitting the backspace key repeatedly against the user's name in the textfield
Comment #2
webchickWhen I do this, after the first unnecessary backspace Firefox skips me back a page as though I've hit the back button. If I keep hitting it, it skips me back another page, etc. I don't know that this is considered "broken" but is definitely "annoying." But that might have more to do with Firefox than Drupal's JS...
What behaviour am I looking for?
Comment #3
asimmonds commentedOn my system,
In Firefox (1.5.07 and 2rc1), the browser's content area goes completely black after the first backspace in the empty textfield, the second backspace goes back a page (it shouldn't as the textfield should still have focus)
In IE6, after the first backspace, the content area goes blank with a javascript error notification in the status bar. This error is 'Line:217, Char: 5, Error: 'this.style' is null or not a object.
Comment #4
chx commentedThat Firefox behaviour is usual, I might say. When using my Internet bank, it sometimes also navigates away from the page. Mapping backspace to back is just asking for trouble.
Comment #5
AjK commentedBut when "back keying", between the last latter of the user name and then "page back feature", I get a broken screen that's mostly white with a black bar across the bottom. The next back key does send the browser back a page like stated. Is that normal behaviour?
In IE6 I just get the white screen with black bar. Page stays broken until you do a page refresh.
Despite that fact, the "carrot" focus is in a textfield so backing up pages certainly isn't behaviour is usual for any browser. It should just not go "anywhere" other than sit there waiting for user to type input.
Comment #6
AjK commentedWorth noting that Pave the way for integration of jQuery into core http://drupal.org/node/69786 at comment #76, backspacing was reported to produce strange results.
I don't know if this issue is related to that in some way.
Comment #7
gregglesI tried to repeat this as the directions in comment #2 stated and I couldn't even repeat the problem. I tried Fx1.5.0.7 and IE6.0 and Fx2.0rc2. None of them exhibited the behavior. These were on a mix of Windows XP Home and Pro.
Can we say for sure this is a Drupal bug and not a browser bug?
What could we even do to fix this?
Comment #8
chx commentedLet's sum up. I talked with Steve[n|] about this, neither of them wanting to fix this -- even if there is something to fix. Greggles hints there is none. Henceforth the best that can be done to grab a shovel and bury this.
Comment #9
chx commentedTypo in regex: Steve(n|)$
Comment #10
Zen commentedI can confirm this in FF2, Opera 9.02 and IE 6 on Windows and Linux. Backspacing in an autocomplete field leads to a page similar to this: http://drupal.org/files/issues/screehshoot.png (from the other issue).
This occurs in 5. Doesn't occur in 4.7.
-K
Comment #11
AjK commentedOK, nothing worse than a critical issue popping up just when RC1 is around the corner to wreck your day so lets put it to bed.
I know those involved didn't want to discuss it and just buried the issue but at least here's a patch to look at that shouldn't need massive amounts of digging to resolve.
This patch basically fixes the problem in FF completely. However, it only part fixes it in IE6. The original problem is fixed but in IE6 the popup now appears in an offset position (to the right). The real problem I cannot supply a more full fix is that I'm no javascript expert. I just did enough to locate where problem appears to be occuring. If some js experts would like to look closer than I'm sure some bright ideas will follow.
Comment #12
AjK commentedOk, my comments above are bo**ox. The problem is still there. Basically, if you backspace nice and slow, one key at a time, when you've deleted the field completely, all is well. But if you take a "run up" at it (i.e. keep hitting the backspace quickly and overrun the number of characters in the form field) the bug will appear. Patch or no patch.
Comment #13
AjK commentedHere's what the javascript console on FF outputs:
Comment #14
AjK commentedOk, Steven and Heine suggested blocking backspace key if the field length decreases to zero (block in both key up and keydown events). This at least has fixed the problem for me.
Comment #15
Anonymous (not verified) commentedok this seems better without a hack.
Comment #16
Anonymous (not verified) commentedto make |gatsby| happy.. here's a better comment. :P
Comment #17
AjK commentedNow Zen's happy with the comment and I'm happy the issue is resolved (works for me a treat)... RTBC :)
Comment #18
Anonymous (not verified) commentedok.. a valid point was made.. we need to check .value.length not just .value
Comment #19
Zen commentedNew patch checked and confirmed to be working. Still RTBC.
-K
Comment #20
gregglesFWIW, I'm still not able to repeat the problem with Fx2.0
Comment #21
dvessel commentedThe same problem appears with Safari 2.0.4.. Bizarre how similar the problem gets reproduced. -same as screen shot from #10.
The patch fixes it though.
Comment #22
drummTested, confirmed with Steven, and Committed to HEAD.
Comment #23
(not verified) commented