<?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>15316</bug_id>
          
          <creation_ts>2007-09-29 03:19:46 -0700</creation_ts>
          <short_desc>Events are executed in designMode</short_desc>
          <delta_ts>2023-02-06 13:43:41 -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>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Alfonso Martínez de Lizarrondo">amla70</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ian</cc>
    
    <cc>karlcow</cc>
    
    <cc>mrowe</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57321</commentid>
    <comment_count>0</comment_count>
    <who name="Alfonso Martínez de Lizarrondo">amla70</who>
    <bug_when>2007-09-29 03:19:46 -0700</bug_when>
    <thetext>If a document is in designMode I don&apos;t think that events should be executed, as they will make the editing harder or even raise errors if they depend on scripts that aren&apos;t loaded while the document is being edited.

Tested in XP with r25792

IE executes them.
Firefox doesn&apos;t execute.
Opera does execute.

Test case following to show that executing events can be annoying. 
If you want to test how they can raise errors, copy some text from MS Word with comments and paste them, the functions called on the onmouseover and onmouseout events aren&apos;t available and they will generate errors in the JS console.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57322</commentid>
    <comment_count>1</comment_count>
      <attachid>16447</attachid>
    <who name="Alfonso Martínez de Lizarrondo">amla70</who>
    <bug_when>2007-09-29 03:21:54 -0700</bug_when>
    <thetext>Created attachment 16447
testcase

This is a simple example of trying to edit a document with an onclick event.
Slightly annoying.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57391</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-09-29 18:28:44 -0700</bug_when>
    <thetext>I&apos;m not sure that I would consider this a bug.  What if I wanted clicking on the link in your example to display a widget where I could configure the text and target of the hyperlink, for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57425</commentid>
    <comment_count>3</comment_count>
    <who name="Alfonso Martínez de Lizarrondo">amla70</who>
    <bug_when>2007-09-30 01:51:40 -0700</bug_when>
    <thetext>This message might give a much better explanation, as well as showing that the current behavior doesn&apos;t match the HTML5 spec (that might need some refinement).
http://lists.w3.org/Archives/Public/public-html/2007Sep/0159.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57429</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-09-30 02:15:39 -0700</bug_when>
    <thetext>You&apos;re right, that is much clearer about the specific issue.  It sounds like the Firefox behaviour is what is desirable here.  Event handlers added on the document from outside should be respected, those defined within the document itself are ignored.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88846</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-08-19 14:43:45 -0700</bug_when>
    <thetext>HTML5 now requires this, though it gets the same effect using quite a different definition:
   http://www.whatwg.org/specs/web-apps/current-work/#scripting2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931477</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-06 13:43:28 -0800</bug_when>
    <thetext>I am not sure whether this is intended bug in relation to this or not but in WebKit ToT (259906@main), if you click on link, you get dialog but once you dismiss dialog, the caret move to start of paragraph / line rather than staying at same place and allowing editing to edit link (hyperlink text). In case of Chrome Canary 112 and Firefox Nightly 111, the caret remains at same place as you intended when trying to edit the hyperlink text.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>16447</attachid>
            <date>2007-09-29 03:21:54 -0700</date>
            <delta_ts>2007-09-29 03:21:54 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>events_designmode.html</filename>
            <type>text/html</type>
            <size>411</size>
            <attacher name="Alfonso Martínez de Lizarrondo">amla70</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxodG1sPg0KCTxoZWFkPg0KCQk8dGl0bGU+RXZlbnRzIGFyZSBleGVjdXRlZCBpbiBk
ZXNpZ25Nb2RlPC90aXRsZT4NCgkJPHNjcmlwdCBsYW5ndWFnZT0iamF2YXNjcmlwdCI+DQoNCgl3
aW5kb3cub25sb2FkID0gZnVuY3Rpb24oKQ0KCXsNCgkJZG9jdW1lbnQuZGVzaWduTW9kZSA9ICdv
bicgOw0KDQoJfQ0KDQoJCTwvc2NyaXB0Pg0KCTwvaGVhZD4NCgk8Ym9keT4NCg0KCQk8cD48YSBo
cmVmPSIjIiBvbmNsaWNrPSJhbGVydCgnaGVsbG8nKSI+VGhpcyBpcyBhIGxpbms8L2E+IHdpdGgg
YW4gb25jbGljayBoYW5kbGVyLiBUcnkgdG8gY2xpY2sgdG8gZWRpdCBpdC48L3A+DQoJPC9ib2R5
Pg0KPC9odG1sPg0K
</data>

          </attachment>
      

    </bug>

</bugzilla>