text field won't focus on click -- TV Listings on My Netscape

RESOLVED DUPLICATE of bug 194228

Status

()

Core
Event Handling
RESOLVED DUPLICATE of bug 194228
16 years ago
14 years ago

People

(Reporter: a-huntwork, Assigned: saari (gone))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
My Netscape just changed their TV Listings source from tvguide to AOLTV.  The
AOLTV content has a text field in which the user must enter his zip code.  This
text field cannot be focused by a mouse click.  The user must instead tab into
it.  This is not easy to discover, so this is a pretty annoying bug.

The textfield is generated with document.write("<input type=text...")

Comment 1

16 years ago
reassigning
Assignee: morse → rods
Component: Form Manager → HTML Form Controls

Comment 2

16 years ago
I see this as well using win xp trunk build 2002051408, marking new
Status: UNCONFIRMED → NEW
Ever confirmed: true
how exactly do I get the TV listings?  Do I need a my.netscape.com account?

Comment 4

16 years ago
-->
Assignee: rods → kin

Comment 5

16 years ago
Boris Zbarsky, I created one for you :-) TNobodyA (username) mozilla (password),
if you click my Netscape on the personal toolbar and then sign in with this
Username/password you will see tv listings on the left hand upper side
Created attachment 84013 [details]
Minimal testcase

The textfield in this testcase cannot be focused.  I'm not sure that's correct,
but....
Terri, thanks for setting up that account.  :)

The site basically does:

document.onmousedown = engage;

function engage(evt){
  var evt = (evt) ? evt : (window.event) ? window.event : "";
  if (evt){
    var elem = (evt.target) ? evt.target : evt.srcElement
  }
  var elemID=elem.id;
  if ( elem.id.indexOf("searchid")!=-1)
  {
    return;
  }
  theService=elemID.substring(5);
  if (elemID.indexOf("move_")==-1) {winObj=null; return false;}
  winObj=d.getElementById('winDrag').style;
  winObj.left=evt.pageX- 50 + "px";
  winObj.top=evt.pageY + 20 + "px";
  winObj.width="200px";
  winObj.height="200px"
  winObj.display="";
  return false;
}

Now returning "false" from this onmousedown handler makes the textfield not take
focus, as in the attached testcase.  The only reason you can focus the search
field on that page is that it has |id="searchid"| and hence returns with a
non-false return value from this function.  The TV listings field has no id, so
|elemID.indexOf("move_")==-1| tests true and the handler returns false.

To events; I don't know whether not allowing textfields to get focused when the
onmousedown event is cancelled is correct....
Assignee: kin → joki
Component: HTML Form Controls → Event Handling
QA Contact: tpreston → rakeshmishra
Bob?  jst?  what's the correct behavior here?

Comment 9

16 years ago
Returning false from onmousedown and/or onmouseup does not prevent click from
firing. 

I don't see why returning false from onmousedown would prevent the field from
being focused. Neither IE or Opera will prevent the field form obtaining focus.
> I don't see why returning false from onmousedown would prevent the field from
> being focused.

Quite simply, because the field takes focus onmousedown (in all the browsers
involved; try it!).  So cancelling onmousedown's default action would logically
prevent the field from taking focus...

That said, I agree that compat with IE/NS4 is what we want here.

Updated

15 years ago
QA Contact: rakeshmishra → trix

Comment 11

14 years ago
.
Assignee: joki → saari
QA Contact: trix → ian

Comment 12

14 years ago
*** Bug 218389 has been marked as a duplicate of this bug. ***

Updated

14 years ago
OS: Linux → All
Hardware: PC → All

Comment 13

14 years ago
duplicate of more recent but much more straightforward bug 194228

*** This bug has been marked as a duplicate of 194228 ***
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.