Giter Club home page Giter Club logo

Comments (5)

jonleighton avatar jonleighton commented on August 19, 2024

Hmm, that's odd. do you have a screen shot? document.elementFromPoint is supposed to hit the element with the highest z index at that point.

I'd also be interested to hear what happens if you disable the click-test code inside Poltergeist - does the click actually succeed?

If you can provide a minimal example to repro the problem that will help.

from poltergeist.

bogdan avatar bogdan commented on August 19, 2024

Tried to reproduce in separated repo but didn't get expected result so far.

Further investigation showed the difference between browser rendering and phantom rendering.
http://i.imm.io/oVgI.png - phantom
http://i.imm.io/oVgT.bmp - chromium

This might not a problem you can solve on poltergeist side.

But is it possible to avoid clickTest call for particular example or click_on call?

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Hmm, that's strange. Is it possible to export that as a static stage so I can repro the rendering difference between phantomjs and chromium?

Also, is the thing you are trying to click visible in the first screenshot?

If it's not, then disabling the click test won't help - because then phantomjs will fail to click it as well. It has to be visible and on top for phantomjs to be able to click it, as it emulates a user click (i.e. with a mouse)

I think there may be an issue where a child element is larger than a parent, and the parent has overflow: hidden. It might be that we then calculate a click position that is hidden, as we calculate the center of the element's bounding box. I should look into adding some sort of fallback - e.g. attemping to click the center, attempting to click the top left, then finally failing.

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Hey @bogdan, given #60 is now closed, could you try again using master and see if this issue still occurs for you? Thanks

from poltergeist.

bogdan avatar bogdan commented on August 19, 2024

The root of the issue was fact that image resizing was disabled in test environment. That is why test image overlapped the text in test but not in dev or production.

from poltergeist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.