New issue
Advanced search Search tips

Issue 914055 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 913310
Owner:
Closed: Dec 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Incorrect scope of click handler

Reported by chris.th...@gmail.com, Dec 11

Issue description

Chrome Version       : 71.0.3578.80
OS Version: 10.0
URLs (if applicable) : https://jsfiddle.net/5rL4tjbk/2/
Other browsers tested:
    Chrome 70.0.3538.110:  OK
    IE/Edge: OK

What steps will reproduce the problem?

Load the Fiddle referenced above or create a new web page with this content:

<!doctype html>
<html><body>
<table>
  <tbody><tr>
     <td id="button1" style="background-color: green;"
         onclick="document.getElementById('display').innerHTML = 'id = ' + id;">
        
         <table style="width:100%;height:100%;"><tbody><tr>
             <td id="innerButton1">Click Me</td>
         </tr></tbody></table>
         
     </td>
  </tbody></table>

<div id="display"/>

</body></html>



What is the expected result?

   Clicking on "Click Me" should display "id = button1".



What happens instead of that?

   "id = innerButton1" is displayed.  The scope of the handler function is the inner TD element, not the one with the onClick handler.



Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36



 
Components: Blink>Input
Labels: -Pri-3 Hotlist-Interop Needs-Bisect Pri-1
Owner: nzolghadr@chromium.org
Status: Assigned (was: Unconfirmed)
Labels: -Type-Bug Type-Bug-Regression
This differs from Firefox. 
Bisect result:

You are probably looking for a change made after 597043 (known good), but no later than 597055 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/244f7b03e36c8e01afbce29736b9fbd22a8d34e3..882241fc2432444c912aa807af3abb1a30ce86e8


Judging by the bisect range, this is same as  bug 913310  - fixed in 71.0.3578.95
Cc: viswa.karala@chromium.org
Labels: -Needs-Bisect Triaged-ET
Mergedinto: 913310
Status: Duplicate (was: Assigned)
Thanks for filing the issue!

As per comment# 0, issue seems to be similar to Issue:  913310 , hence merging into it and marking it as Duplicate.
Note: Feel free to Un-Dupe it if not the case.

Thanks!

Sign in to add a comment