Bug 190146 - css focus pseudoclass fails with inputs
Summary: css focus pseudoclass fails with inputs
Status: RESOLVED DUPLICATE of bug 190188
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.2.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-20 11:05 UTC by lunter
Modified: 2009-04-20 20:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
source (560 bytes, text/html)
2009-04-20 11:05 UTC, lunter
Details
Example_2 (33.95 KB, text/html)
2009-04-20 17:47 UTC, lunter
Details
example1 (3.72 KB, text/html)
2009-04-20 17:50 UTC, lunter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lunter 2009-04-20 11:05:38 UTC
Version:           4.2.2 (using KDE 4.2.2)
OS:                MS Windows
Installed from:    MS Windows

Run this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <style>
   input{border:2px black solid}
   input:focus{border-color:red}
  </style>
 </head>
 <body>
  <div><input readonly="readonly" /></div>
  <div>Click on input element - it should have now red border (though readonly attribute)</div>
  <div>- Konqueror: FAILS</div>
  <div>- IE: OK</div>
  <div>- Firefox: OK</div>
  <div>- Opera: OK</div>
  <div>- Safari: OK</div>
  <div>- Chrome: OK</div>
 </body>
</html>
Comment 1 lunter 2009-04-20 11:05:56 UTC
Created attachment 32948 [details]
source
Comment 2 Maksim Orlovich 2009-04-20 16:44:16 UTC
As in the other one: That's because a readonly element can't receive focus.
Comment 3 lunter 2009-04-20 17:22:49 UTC
Your readonly input behaves like didabled input.
Disabled can not be focused (and selected)

Readonly can be focused (selected and copied), but not changing.

All javascript datachosers, color-pickers do not work on Konqueror (only on Konqueror) because onfocus does not fire.

Example 1: http://js.webhelp.pl/js/prz/blatek/datepicker.html
Click first (second or third input). Only Konqueror fails.

If you want, I can find more examples in internet...
Comment 4 lunter 2009-04-20 17:47:52 UTC
Created attachment 32957 [details]
Example_2

Example 2: only konqueror can't open datechooser window
Comment 5 lunter 2009-04-20 17:50:53 UTC
Created attachment 32958 [details]
example1
Comment 6 lunter 2009-04-20 17:59:06 UTC
Please read carefully W3C:

http://www.w3.org/TR/html401/interact/forms.html#adef-readonly

Quoted:
Read-only elements receive focus but cannot be modified by the user.
Comment 7 Maksim Orlovich 2009-04-20 20:50:30 UTC
Fair enough -- thanks.
P.S. but if you read CSS2.1 carefully, you'll notice that its behavior on form elements is unspecified, and use of CSS on them is a SHOULD NOT.

*** This bug has been marked as a duplicate of bug 190188 ***