New issue
Advanced search Search tips

Issue 848490 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

releasePointerCapture function is failing on pixel stylus input but not touch input

Project Member Reported by wanjason@google.com, May 31 2018

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 10452.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Safari/537.36
Platform: 10452.85.0 (Official Build) stable-channel eve

Steps to reproduce the problem:
Use the following html/css/javascript code on Codebin or similar:

<!DOCTYPE html>
<meta charset="utf-8">

<style>
  #foo {
    color: #333;
    text-align: center;
    padding: 1em;
    background: #ffea61;
    box-shadow: 0 0 0.5em #999;
  }
</style>

<div id="foo">
  Hello World!
</div>

<script>
  document.addEventListener('gotpointercapture', function(e) {
    try { 
      e.target.releasePointerCapture(e.pointerId);
      document.getElementById("foo").innerHTML = "touch doesn't throw error";
    } catch (exception) {
      document.getElementById("foo").innerHTML = "stylus throws an error";
    }
  });
</script> 

What is the expected behavior?
If you touch the yellow hello world button with a pixel stylus on the pixel book, it should not throw an error in the try/catch statement and change the text to 'touch doesn't throw error'.

What went wrong?
If you touch the yellow hello world button with a a pixel stylus on a pixel book, it throws an error in the try/catch statement running the releasePointerCapture function and changes the text to 'stylus does throw an error'.

Did this work before? N/A 

Chrome version: 66.0.3359.158  Channel: n/a
OS Version: 10452.85.0
Flash Version:
 

Comment 1 by tkent@chromium.org, Jun 1 2018

Components: -Blink Blink>Input
Labels: Needs-Feedback
Reporter, I tested this scenario with a Pixel book with M67 chrome version and it doesn't give me that error.
https://output.jsbin.com/xeqokayoza

Would you mind testing it with the latest version and let me know if you still see this issue?
I works with the link https://output.jsbin.com/xeqokayoza, but it does not work when you go to 'Edit in JS Bin' and interact with the output console.
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 7 2018

Cc: nzolghadr@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: lanwei@chromium.org
Status: Assigned (was: Unconfirmed)
Correct. It does not work within an embedded iframe. Lan would you able to take a look at this?
The problem starts from here
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/Element.cpp?rcl=195db4ec8d8bc4fc650015fdd86de98ce81748d1&l=3389

and I guess for pen since it has non one ids probably the target frame doesn't have it as active or something.

Sign in to add a comment