<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>11767</bug_id>
          
          <creation_ts>2006-12-06 04:48:53 -0800</creation_ts>
          <short_desc>REGRESSION: Clicking on scrollbar of textarea does not fully focus the textarea</short_desc>
          <delta_ts>2017-07-18 08:30:08 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>esprehn</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>jonlee</cc>
    
    <cc>rniwa</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43113</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-12-06 04:48:53 -0800</bug_when>
    <thetext>Summary:

When clicking on the scrollbar of an unfocused textarea, focus is not fully set on the textarea element since no caret is drawn and typing has no effect.  (See Bug 11746 Comment #15 for behavior of other modern web browsers.)

Steps to reproduce:

1. Load a page with a textarea (like this bug page).
2. Click in the web page (but outside of the textarea).
3. Click on the scrollbar part of the textarea (either the bar itself or its buttons--anywhere).

Expected behavior:

A caret should appear in the textarea, and typing should insert text into the textarea.

Actual behavior:

A focus ring is drawn around the textarea, but typing does nothing and no caret is drawn.

Workaround:

Once the textarea has &quot;focus&quot; with a mouse click in the scrollbar part, hit Tab, then Shift-Tab.  Note that a caret is drawn and typing is possible within the textarea.

Notes:

Regression from shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8L127).  See also Bug 11746 Comment #15 for behavior of other modern web browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31247</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-01-28 19:12:28 -0800</bug_when>
    <thetext>&lt;rdar://problem/4960271&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24139</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-02-11 16:12:32 -0800</bug_when>
    <thetext>After a little investigating, it seems that this is happening because HTMLTextAreaElement::updateFocusAppearance() is not being called when the the &lt;textarea&gt; is focused by a mouse click to the scrollbar area.  It works for tabbing into it because the tabbing mechanism (FocusController) calls HTMLTextAreaElement::focus() (which it probably shouldn&apos;t, but rather call Document::setFocusedNode() instead), which calls HTMLTextAreaElement:: updateFocusAppearance().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112295</commentid>
    <comment_count>3</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-03-04 14:48:42 -0800</bug_when>
    <thetext>This no longer happens. Clicking on the resize handle doesn&apos;t focus it, but I&apos;m not sure it should.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112337</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-03-04 18:44:58 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; This no longer happens. Clicking on the resize handle doesn&apos;t focus it, but I&apos;m
&gt; not sure it should.

I still see the same behavior described in Comment #0 with Safari 4 Developer Preview and WebKit nightly build r41431.

What software were you using to test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112339</commentid>
    <comment_count>5</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-03-04 18:49:17 -0800</bug_when>
    <thetext>Oh crap. Sorry. I actually read the actual behavior backwards (as in, that it would get no focus rect). I even reread it to make sure. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>216371</commentid>
    <comment_count>6</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2010-04-23 04:32:24 -0700</bug_when>
    <thetext>still reproducible 3.5 years later on QtWebKit/Linux</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>714951</commentid>
    <comment_count>7</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-09-07 14:05:26 -0700</bug_when>
    <thetext>The issue is a little more complicated than just &quot;fully focusing&quot;. Gecko remembers the caret position so if you click in a middle of a textarea, unfocus it, then tab back into it or click the scrollbar your caret is still in the middle. WebKit doesn&apos;t store the caret position though, so we always put it back at the start when tabbing.

It would be really weird if clicking the scrollbar on an unfocused textarea put the caret at the start since it&apos;s quite possible you can&apos;t see the start of the textarea when scrolling.

The current behavior as described in this bug make sense in a world where we forget the caret position.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>714955</commentid>
    <comment_count>8</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-09-07 14:06:38 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767xxxxxxxx
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>714960</commentid>
    <comment_count>9</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-09-07 14:12:45 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; https://bugs.webkit.org/show_bug.cgi?id=11767https://bugs.webkit.org/show_bug.cgi?id=11767
&gt; ...

Woops. :( Messing with textareas in bugzilla and history items results in a bad time.

Note that the behavior of browsers as described here is really weird. See: https://bugs.webkit.org/show_bug.cgi?id=11746#c15

We should probably decide if we want to match the IE6 behavior or the Gecko behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>722869</commentid>
    <comment_count>10</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-09-18 09:41:32 -0700</bug_when>
    <thetext>I don&apos;t think we necessarily need to match other browsers here. The focus behavior is largely platform dependent; we should do whatever makes most sense on each platform.

It sounds as if we&apos;re setting the focus but not moving the selection there.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>