473,660 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3790
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.de mon.co.uk>
Oct 7 '08 #2
On Oct 9, 1:35*am, Thomas 'PointedEars' Lahn <PointedE...@we b.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
20691
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 init() {
4
6119
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 Firefox, Safari and Konqueror, but the onchange event just doesn't fire on IE6. Firefox's javascript console shows no errors, and the IE script debugger shows nothing. onchange is not triggered.
2
2826
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 on the same item twice "in a row" to select it. Does anyone know how to automatically make a web page do a refresh when the web page loads? This would prevent the user from having to do the refresh, themselves.
21
29771
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 prodcut anme have used ajax to avoid refreshing of page this works fine 2.now i have created one row with checkbox|select box|text|text|text|text| where in the select box values are fetched from table here also i have used ajax for getting the m_name...
8
2972
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 box with values too. Depending on the options selected from the two, the values will be calculated and displayed. everything worked fine with the calculation and im getting the right amount totalled up. I only have one issue, whenever the radio...
37
9043
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 across two projects that have the appeal of striving for simple, pythonic APIs: PyGUI and wax. The latter is a wrapper around wxPython. It is lacking documentation but actually quite usable and concise. The other, PyGUI, has an even nicer API and...
1
3633
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++ application. I work on windows. can anyone give me a small example how to integrate webkit in my application. Thank you in advance.
3
1675
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 rendering engine within its web browser was "interesting" and added "we may look at that."' <URL: http://www.appleinsider.com/articles/08/11/06/microsofts_ballmer_considers_using_webkit_within_ie.html
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.