473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

select onchange with typing in Webkit

In Firefox, IE and Opera, with a select menu with size 1, typing a few
characters in the menu selects an item and triggers the onchange event.

In the Webkit-based Safari and Google Chrome, the item appears to be
selected (visually and selectedIndex is set) but the onchange is not
triggered.

The W3C says "The onchange event occurs when a control loses the input
focus and its value has been modified since gaining focus."

http://www.w3.org/TR/REC-html40/interact/scripts.html

Doesn't that mean if you type to select then tab or click away from the
menu, the onchange should fire? This doesn't happen in Safari or Google
Chrome.

I can work around this with an onblur but is it me or Webkit not getting
this right?

Toy example at

http://www.cs.northwestern.edu/~ries.../menutest.html
Oct 7 '08 #1
2 3779
Chris Riesbeck wrote:
The W3C says "The onchange event occurs when a control loses the input
focus and its value has been modified since gaining focus."

http://www.w3.org/TR/REC-html40/interact/scripts.html

Doesn't that mean if you type to select then tab or click away from the
menu, the onchange should fire?
It does mean that.
This doesn't happen in Safari or Google Chrome.
It does happen in "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE)
AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21".
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Oct 7 '08 #2
On Oct 9, 1:35*am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
(...)
That is indeed a bug as is Safari's not regarding the selection a change in
the control's value when it is caused by putting in the leading characters;
however, Quirks Mode might trigger this non-standard behavior. *(I cannot
test it right now.)
I did. I does fail in Safari 3.1.2, latest released version.
But it's been fixed already in the nightly builds (I tested r36882):

http://nightly.webkit.org/

--
Jorge.
Oct 9 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
4
by: Bart van Deenen | last post by:
Hi all I have a script where I dynamically create multiple inputs and selects from a script. The inputs and selects must have an associated onchange handler. I have the script working fine on...
2
by: entfred | last post by:
I was experimenting with trying to select the same item in a select box twice in a row and found out that you need to do a refresh (view - refresh) in Internet Explorer. This is so you can click...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
8
by: crayfiss | last post by:
Hi, firstly I am a total freshie in all this. From what I have gathered on the web and this forum, I finally managed to get my form up. I have a set of radio buttons with values to it and a select...
37
by: Michael Palmer | last post by:
As anyone knows, the state of Python GUI programming is a little fractured at this time, with many toolkits, wrappers and meta-wrappers dead and alive, with or without documentation. I've come...
1
by: Mital | last post by:
I want to create a webkit/c++ custom application to run javascript on top of it. can anyone help me out. I am finding difficulties as in i dont know how to include webkit.dll in my sample c++...
3
by: RobG | last post by:
According to AppleInsider, Steve Ballmer is not averse to the idea: 'Addressing a developer conference in Sydney Australia, Microsoft CEO Steve Ballmer said the idea of using WebKit as the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.