Closed Bug 335508 Opened 18 years ago Closed 17 years ago

Can not cancel resetting input on double escape

Categories

(Toolkit :: Form Manager, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: tivv00, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.0.1) Gecko/20060202 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.0.1) Gecko/20060202 Firefox/1.5.0.1

returning false in all keyboard event handlers does not prevent input content from disappearing while pressing escape twice.

Reproducible: Always

Steps to Reproduce:
1.Load testcase
2.select input
3.Press escape key twice

Actual Results:  
text disappears

Expected Results:  
nothing happends

Also tested on Windows in Deep Park 20060405
Attached file testcase
It works for me in a slightly older SeaMonkey on OS/2 where nothing is removed.

(In reply to comment #0)
> Also tested on Windows in Deep Park 20060405

Does this mean the problem exists on Windows, too? Or that it works there?
(In reply to comment #2)
> It works for me in a slightly older SeaMonkey on OS/2 where nothing is removed.

And does it removes for regular inputs without javascripts?

> 
> (In reply to comment #0)
> > Also tested on Windows in Deep Park 20060405
> 
> Does this mean the problem exists on Windows, too? Or that it works there?

The problem exists.
BTW: one more problem for Escape - you can not change input.value in keypress or keydown while escape is pressed, only in keyup. I will add new testcase in a moment. I won't fill new bug because it looks like same things.

I am getting very strange results here. It seems to depend on what string I am trying to set to input. This testcase has two inputs. On one input is never reset (set to blank string) on double escape, on another - it is. May be it depends on if I set this.value to same string as before.
Component: DOM: Events → Form Manager
OS: OS/2 → All
Product: Core → Firefox
Hardware: Other → PC
OK, I do see the bug in an OS/2 Firefox built from 1.8.0 branch today but _not_ in an OS/2 SeaMonkey built from the same code. For me, all inputs are reset (emptied) with Firefox, even the one which works as expected for you. In SeaMonkey, the ones in attachment 220917 [details] are set to the time strings while the one in attachment 219868 [details] does not change at all. The same happened for a Linux SeaMonkey of 20060429 from 1.8 branch.

I therefore changed this from Core to Firefox (my best guess under Components then is Form Manager) and as you say that this happens on Windows, too, I changed OS to All.
Keywords: testcase
Assignee: events → nobody
QA Contact: ian → form.manager
I cannot reproduce this on Mac or Windows Firefox trunk builds of 20070130.  Reporter are you able to reproduce with a recent build?
I think the reporter is no longer using OS/2, so I tested this again.

However, I forgot what was actually supposed to happen with the testcases. Here is what does happen on OS/2 trunk builds dated 20070201:

- attachment 220917 [details]
  + SeaMonkey resets both input fields on ESC, the first to a Unix time
    string, the second to a readable time string
  + Firefox flashes the respective time strings on ESC for a fraction of a
    second before the original strings "bbb" and "aaa" appear again

- attachment 219868 [details]
  Nothing happens when pressing ESC, even multiple times or holding the key
  down. The original string "aaa" is always displayed and stays there without
  flashing.
I can't reproduce with testcase #1 on Linux, so this seems to work correctly.
testcase #2 still have a problem: The code can't change value of an input box during onKeyDown escape key processing (it should change the value to current time
Tested on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a2pre) Gecko/20070123 Minefield/3.0a2pre
- attachment 220917 [details]
  WORKSFORME on trunk.

- attachment 219868 [details]
  WORKSFORME as well.  There is a small glitch here.  When I hold down the Escape
  button, the dates are appended momentarily from time to time, but after
  releasing Escape, the modifications are not persisted...
(In reply to comment #9)
> - attachment 219868 [details]
>   WORKSFORME as well.  There is a small glitch here.  When I hold down the
> Escape
>   button, the dates are appended momentarily from time to time, but after
>   releasing Escape, the modifications are not persisted...
> 

Actually the question is why they are not persisted, but this is rather question of another bug. This one seems to be fixed.
But changing input value during onkeydown is pretty valid as for me.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
It doesn't work for me with attachment 220917 [details].
Is it a Linux specific problem?

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7pre) Gecko/2007073004 Minefield/3.0a7pre
Product: Firefox → Toolkit
(In reply to comment #11)
> It doesn't work for me with attachment 220917 [details].
> Is it a Linux specific problem?
> 
> Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7pre) Gecko/2007073004
> Minefield/3.0a7pre

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

Attachment

General

Creator:
Created:
Updated:
Size: