<?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>195437</bug_id>
          
          <creation_ts>2019-03-07 14:53:51 -0800</creation_ts>
          <short_desc>[iOS] Pasting text into Microsoft Visio sometimes zooms and scrolls</short_desc>
          <delta_ts>2019-03-07 22:53:21 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 12</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Daniel Bates">dbates</assigned_to>
          <cc>megan_gardner</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1513732</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2019-03-07 14:53:51 -0800</bug_when>
    <thetext>It is annoying that sometimes when you paste content into Microsoft Visio that WebKit sometimes zooms and scrolls.

Steps to reproduce:

The following assume you have a hardware keyboard attached and you have some content on the clipboard.

1. Visit &lt;http://portal.office.com&gt; and sign in.
2. Open Visio and create a new document.
3. Drag and drop a shape to the document.
4. Press the Return key to edit the label for the shape.
5. Press Command + V to paste.

Then WebKit will zoom and scroll the page such that the caret is aligned to the right edge of the page before the scrollbar. (Note if you have trouble reproducing then try changing Visio&apos;s zoom Control + + or Control + -. You can also try to do that in combination with moving the shape to be closer to the edge of the Visio document).

The expected result is that no zooming or scrolling occur on paste.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513733</commentid>
    <comment_count>1</comment_count>
      <attachid>363934</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2019-03-07 14:55:29 -0800</bug_when>
    <thetext>Created attachment 363934
Work-in-progress</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513735</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-03-07 14:55:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/48691509&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513800</commentid>
    <comment_count>3</comment_count>
      <attachid>363934</attachid>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2019-03-07 16:33:53 -0800</bug_when>
    <thetext>Comment on attachment 363934
Work-in-progress

View in context: https://bugs.webkit.org/attachment.cgi?id=363934&amp;action=review

&gt; Source/WebKit/WebProcess/WebPage/WebPage.cpp:5321
&gt; +    isProgrammaticRefocus = !m_userIsInteracting &amp;&amp; m_keyboardIsAttached;

I haven&apos;t considered this approach thoroughly yet, but here&apos;s a quick comment...

isProgrammaticRefocus seems like a strange name for this variable. The fact that it&apos;s always false on non-iOS platforms would imply that it&apos;s not possible to programmatically refocus an element there (which is not true!) It&apos;s also unclear to me why m_keyboardIsAttached would matter here — an element can always be programmatically focused after it already has focus, regardless of whether or not a hardware keyboard is attached. The difference seems to be whether or not programmatic focus is allowed to bring up the input view.

Is this really about whether or not programmatic focus causes the input view to be shown by default?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513846</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2019-03-07 17:58:48 -0800</bug_when>
    <thetext>Don’t let the name get to you because I don’t like it too and need to think some
more about this code to figure out a) whether this approach is correct b) where the code should live (originally the whole focus due to user interaction was in WebPageIOS and and c) what the name of the variable and existing variables should be called</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513930</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2019-03-07 22:53:21 -0800</bug_when>
    <thetext>This bug also happens on Mac when you paste or paste with matching style. Need to try with Chrome/Firefox/Edge.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>363934</attachid>
            <date>2019-03-07 14:55:29 -0800</date>
            <delta_ts>2019-03-07 14:55:35 -0800</delta_ts>
            <desc>Work-in-progress</desc>
            <filename>work-in-progress.diff</filename>
            <type>text/plain</type>
            <size>1062</size>
            <attacher name="Daniel Bates">dbates</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvV2ViUHJvY2Vzcy9XZWJQYWdlL1dlYlBhZ2UuY3Bw
IGIvU291cmNlL1dlYktpdC9XZWJQcm9jZXNzL1dlYlBhZ2UvV2ViUGFnZS5jcHAKaW5kZXggMGY3
MGIzYmJmMDMuLmJiYTQ5NjlmZDRhIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0L1dlYlByb2Nl
c3MvV2ViUGFnZS9XZWJQYWdlLmNwcAorKysgYi9Tb3VyY2UvV2ViS2l0L1dlYlByb2Nlc3MvV2Vi
UGFnZS9XZWJQYWdlLmNwcApAQCAtNTMxNSw3ICs1MzE1LDEyIEBAIHZvaWQgV2ViUGFnZTo6ZWxl
bWVudERpZFJlZm9jdXMoV2ViQ29yZTo6RWxlbWVudCYgZWxlbWVudCkKIAogdm9pZCBXZWJQYWdl
OjplbGVtZW50RGlkRm9jdXMoV2ViQ29yZTo6RWxlbWVudCYgZWxlbWVudCkKIHsKLSAgICB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