<?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>184446</bug_id>
          
          <creation_ts>2018-04-10 04:32:54 -0700</creation_ts>
          <short_desc>[GTK] With WebKitGTK+ 2.20.0, selecting text and unselecting it makes it randomly disappear/deleted</short_desc>
          <delta_ts>2018-06-22 01:28:26 -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>WebKitGTK</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          <see_also>https://bugzilla.gnome.org/show_bug.cgi?id=794723</see_also>
          <bug_file_loc>https://gitlab.gnome.org/GNOME/gtk/issues/132</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andres Gomez Garcia">agomez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andrea.vai</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>bugzilla</cc>
    
    <cc>cadubentzen</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>nicolas</cc>
    
    <cc>slomo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1413250</commentid>
    <comment_count>0</comment_count>
    <who name="Andres Gomez Garcia">agomez</who>
    <bug_when>2018-04-10 04:32:54 -0700</bug_when>
    <thetext>I can reproduce with epiphany 3.27.90-58-gf0e577e with WebKitGtk+ 2.20.0 from gnome-nightly&apos;s flatpak.

And, also evolution 3.28.0-4 and epiphany-browser 3.28.0.1-1 with WebKitGtk+ 2.20.0-dmo2 from current Debian Testing, at the same time.

Running under gnome-shell as Wayland compositor.

Additionally, the text cursor doesn&apos;t land in the place you want to when you click in a different location of an editable text entry. It just lands in a different place, randonmly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413257</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-10 06:37:57 -0700</bug_when>
    <thetext>I&apos;ve noticed this with evolution, but not with epiphany.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413347</commentid>
    <comment_count>2</comment_count>
    <who name="Andres Gomez Garcia">agomez</who>
    <bug_when>2018-04-10 12:22:31 -0700</bug_when>
    <thetext>Also, just scrolling in web pages and, then, clicking in a different field or button of the same web page leads to random jumps in the web view. It could be a completely different bug but it feels like it is all related.

For example: after finishing writing this, I&apos;ve scrolled a bit down to try to click the &quot;Save Changes&quot; button and, upon clicking, the scroll moves to show the last position of the cursor in this text entry and I miss clicking the button.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413528</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Bentzen">cadubentzen</who>
    <bug_when>2018-04-10 19:24:33 -0700</bug_when>
    <thetext>Here the selection disappears after unselecting too.

Running Epiphany 3.27.90-65-gd77a228 with WebKitGTK+ 2.20 from gnome-nightly&apos;s flatpak.

Also running on gnome-shell with Wayland.

&gt; Additionally, the text cursor doesn&apos;t land in the place you want to when you click in a different location of an editable text entry. It just lands in a different place, randonmly.

Could not reproduce it here.

&gt; Also, just scrolling in web pages and, then, clicking in a different field or button of the same web page leads to random jumps in the web view. It could be a completely different bug but it feels like it is all related.

This happens here as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413607</commentid>
    <comment_count>4</comment_count>
    <who name="Sebastian Dröge (slomo)">slomo</who>
    <bug_when>2018-04-11 00:24:12 -0700</bug_when>
    <thetext>&gt; &gt; Also, just scrolling in web pages and, then, clicking in a different field or button of the same web page leads to random jumps in the web view. It could be a completely different bug but it feels like it is all related.

&gt; This happens here as well.

This also happens in evolution for me (as well that selected text disappears after unselecting it).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413608</commentid>
    <comment_count>5</comment_count>
    <who name="Sebastian Dröge (slomo)">slomo</who>
    <bug_when>2018-04-11 00:24:53 -0700</bug_when>
    <thetext>&gt; This also happens in evolution for me (as well that selected text disappears after unselecting it).

Forgot to add, this is also webkit 2.20.0 on Debian/unstable, running gnome-shell on Wayland.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413610</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-11 00:31:16 -0700</bug_when>
    <thetext>I can only reproduce it in evolution, also gnome-shell under wayland FWIW.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413617</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-11 01:27:33 -0700</bug_when>
    <thetext>Interesting, I can reproduce it with 2.20 and trunk but only when running outside of my jhbuild, that&apos;s why I can only reproduce it with evo (I always run ephy from my jhbuild).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413619</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-11 01:45:28 -0700</bug_when>
    <thetext>I&apos;ve upgraded gtk+ in my jhbuild to 3.22.29 and then I can reproduce it, but not with current gtk-3-22 branch, so it seems to be a GTK+ bug that has already been fixed. I&apos;m biseting to make sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413628</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-11 02:45:51 -0700</bug_when>
    <thetext>This one broke it:

e8bffe0c56431710299cf68afb575ec578045055 is the first bad commit
commit e8bffe0c56431710299cf68afb575ec578045055
Author: Carlos Garnacho &lt;carlosg@gnome.org&gt;
Date:   Thu Nov 30 18:53:26 2017 +0100

    modules: Add wayland IM implementation
    
    This IM context implementation goes through the gtk-text-input protocol,
    leaving up to the compositor the actual interaction with IM engines. If
    the protocol is not offered by the compositor, GTK+ will fallback to the
    IMs as specified through GtkSettings.

:100644 100644 9d314d83bd16410e853400bbe37af094a30b6653 b4d1d69b4de08701cf97edf1d5bd84aee0884a7e M      configure.ac
:040000 040000 7ce13871d6a3f19573b3cc2aabdee603df6ac36f 21f2fd6fd4d30c2116ab1fd6d7586420a2d39d96 M      gtk
:040000 040000 bc9f5b41a0a0eaa899867f2147588203491c8e8f a2d628453316a142085b905b64d5d2a4ae16473b M      modules

And this one fixed it:

4b95d7406821196615149fb2527840ff14626a03 is the first bad commit
commit 4b95d7406821196615149fb2527840ff14626a03
Author: Matthias Clasen &lt;mclasen@redhat.com&gt;
Date:   Mon Mar 26 21:38:28 2018 -0400

    wayland: Don&apos;t emit signals if nothing changed
    
    We were emitting a preedit-changed even if the preedit text did
    not actually change, causing text views to scroll.
    
    https://gitlab.gnome.org/GNOME/gtk/issues/132
    https://gitlab.gnome.org/GNOME/gtk/merge_requests/83#note_93411

:040000 040000 c992aac22373017664702a6a395aebbdfb546bc2 8166d55705bb0d00ac176157b8f76e203f4cfe07 M      modules

Definitely not WebKit bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1415887</commentid>
    <comment_count>10</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-04-19 00:03:44 -0700</bug_when>
    <thetext>*** Bug 184735 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433267</commentid>
    <comment_count>11</comment_count>
    <who name="Nicolas Repentin">nicolas</who>
    <bug_when>2018-06-15 00:17:40 -0700</bug_when>
    <thetext>Hi

The bug seems to be fixed at some time, but now on libwebkit2gtk 2.20.3-1 on debian, the bug is here again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433339</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-15 07:56:39 -0700</bug_when>
    <thetext>Are you sure it&apos;s caused by the WebKitGTK+ update, and not any GTK+ update? If so, maybe r232049 or r232151 could be to blame.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433945</commentid>
    <comment_count>13</comment_count>
    <who name="Andres Gomez Garcia">agomez</who>
    <bug_when>2018-06-18 04:19:21 -0700</bug_when>
    <thetext>(In reply to Nicolas Repentin from comment #11)
&gt; Hi
&gt; 
&gt; The bug seems to be fixed at some time, but now on libwebkit2gtk 2.20.3-1 on
&gt; debian, the bug is here again.

As already commented in this very same bug, the problem is not WebKit but GTK.

This bug happens with GTK+ 3.22.29 and was already corrected by 3.22.30. Check the installed version in your Debian system.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>