<?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>105898</bug_id>
          
          <creation_ts>2013-01-01 10:30:43 -0800</creation_ts>
          <short_desc>contenteditable contains DIV&apos;s with display: inline-block breaks up and down arrows</short_desc>
          <delta_ts>2024-02-08 15:31:05 -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>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://jsfiddle.net/tSkj9/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yermo">yml</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>jameshfisher</cc>
    
    <cc>karlcow</cc>
    
    <cc>rniwa</cc>
    
    <cc>timdown</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>798452</commentid>
    <comment_count>0</comment_count>
    <who name="Yermo">yml</who>
    <bug_when>2013-01-01 10:30:43 -0800</bug_when>
    <thetext>The following HTML:

&lt;div contenteditable=&quot;true&quot;&gt;
test
&lt;div style=&quot;display: inline-block;&quot;&gt;
    &lt;div style=&quot;font-weight: bold&quot;&gt;Click here. Why does down arrow now work?&lt;/div&gt;
&lt;/div&gt;
test
&lt;div&gt;
test
&lt;div style=&quot;display: inline-block;&quot;&gt;
    &lt;div style=&quot;font-weight: bold&quot;&gt;TEST2&lt;/div&gt;
&lt;/div&gt;
Click mouse here and press up arrow in chrome? Why does it not go up?
&lt;/div&gt;
&lt;/div&gt;

causes the UP and DOWN arrows to fail in Chome.

See: http://stackoverflow.com/questions/14108115/chrome-divs-with-display-inline-block-breaks-up-and-down-arrows#comment19525253_14108115</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1808573</commentid>
    <comment_count>1</comment_count>
    <who name="James Fisher">jameshfisher</who>
    <bug_when>2021-10-25 14:01:20 -0700</bug_when>
    <thetext>This is still a bug here in 2021. See my minimal test case: https://codepen.io/jameshfisher/pen/KKvWoEe

Here is the corresponding bug report in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1088403

Can someone at least mark the status as &quot;CONFIRMED&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931243</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-05 15:43:42 -0800</bug_when>
    <thetext>(In reply to James Fisher from comment #1)
&gt; This is still a bug here in 2021. See my minimal test case:
&gt; https://codepen.io/jameshfisher/pen/KKvWoEe
&gt; 
&gt; Here is the corresponding bug report in Chromium:
&gt; https://bugs.chromium.org/p/chromium/issues/detail?id=1088403
&gt; 
&gt; Can someone at least mark the status as &quot;CONFIRMED&quot;?

I am able to reproduce based on the following CodePen and &apos;down&apos; arrow does not go to next line. Changing it to &quot;New&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931253</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-02-05 16:44:41 -0800</bug_when>
    <thetext>The markup in the codePen is

&lt;div contenteditable=&quot;true&quot;&gt;
  &lt;p&gt;
    The &quot;down&quot; key from here goes to this
    &lt;span class=&quot;inline-block&quot;&gt;inline-block&lt;/span&gt;
    instead of going to ...
  &lt;/p&gt;
  &lt;p&gt;... the next line&lt;/p&gt;
&lt;/div&gt;

with the style
.inline-block {
  display: inline-block;
  background-color: pink;
}

It seems that the arrow up and down in content editable navigates from block to block, if we remove the inline-block. The arrow navigation is going indeed to the next line. 

I don&apos;t know if keyboard navigation is specified in contenteditable markup. 
https://html.spec.whatwg.org/multipage/interaction.html#contenteditable

There was a similar issue of navigation for contenteditable stuff in Gecko
https://bugzilla.mozilla.org/show_bug.cgi?id=669026

I wonder if inline-block in the context of navigation line by line should be ignored. 

Is it part of this
https://searchfox.org/wubkat/rev/6c4c981002fe98d371b03ab862b589120661a63d/Source/WebCore/editing/FrameSelection.cpp#1631-1664</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931255</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-02-05 16:46:21 -0800</bug_when>
    <thetext>Ah probably more here. 
https://searchfox.org/wubkat/rev/6c4c981002fe98d371b03ab862b589120661a63d/Source/WebCore/editing/VisibleUnits.cpp#1013-1067</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931257</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-05 16:48:36 -0800</bug_when>
    <thetext>(In reply to Karl Dubost from comment #4)
&gt; Ah probably more here. 
&gt; https://searchfox.org/wubkat/rev/6c4c981002fe98d371b03ab862b589120661a63d/
&gt; Source/WebCore/editing/VisibleUnits.cpp#1013-1067

I am already touching this piece in one of open PR to fix another keyboard navigation issue but I tested this CodePen and it is not fixed with that PR. Something still to figure out about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011957</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-08 15:31:05 -0800</bug_when>
    <thetext>&lt;rdar://problem/122587531&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>