Code Monkey home page Code Monkey logo

Comments (7)

kate2753 avatar kate2753 commented on June 16, 2024

Here is an example of scrolling within iframe (JSFiddle uses iframe for the results pane) - http://jsfiddle.net/MvJrL/ .

Are you seeing this issue in a specific browser or all browsers? If you are seeing this in all browsers it's probably an issue with how your page is implemented, because this JSFiddle works for me in latest Chrome and Firefox. If the same JSFiddle is broken in specific browser, then it's likely something we need to fix in hopscotch.

from hopscotch.

isAlmogK avatar isAlmogK commented on June 16, 2024

I'm running into the same issue with a single page web app

from hopscotch.

Danny-Engelman avatar Danny-Engelman commented on June 16, 2024

Had to fix this on a SharePoint 2013 env. just now. (not an IFrame)
I patched hopscotch.js line 1354 to not scroll on the body but the main DIV

//jQuery('body, html').animate({ scrollTop: scrollToVal }, getOption('scrollDuration'), cb);
$('#s4-workspace').animate({scrollTop: scrollToVal }, getOption('scrollDuration'), cb);

I suggest adding an option "scrollAnchor" set to the default 'body, html'
and then line 1354

jQuery(getOption('scrollAnchor')).animate({ scrollTop: scrollToVal }, getOption('scrollDuration'), cb);

from hopscotch.

kate2753 avatar kate2753 commented on June 16, 2024

I see, step element is within a scrollable parent, so hopscotch tries to scroll body of the page, not the scrollable parent. Here's updated JSFiddle that replicates the behavior http://jsfiddle.net/rm5k2ywk/

We could fix it either by providing scroll anchor for a given step or try to figure out the scrollable parent and scroll it instead of the body of the document. The second option might get complicated an messy when there are several nested scrollable parents, each of which needs to be scrolled.

from hopscotch.

MrMTaylor avatar MrMTaylor commented on June 16, 2024

I'm having the same issue. My parent element is a

which is not scrolled when I click on the next button, instead the body scrolls and leaves me with a blank screen by the third step.

image

from hopscotch.

taveras avatar taveras commented on June 16, 2024

I'm having the same issue. I wish each individual step object had an optional parameter to specify the scrollable container, instead of scrolling the body element.

edit: thinking about it a bit, the scrollAnchor option that @Danny-Engelman is about the same thing. I applied a monkey-patch using the same idea. :)
Only thing to be mindful of is the position of the bubble itself.

from hopscotch.

knvpk avatar knvpk commented on June 16, 2024

Im running into same problem, im using the nicescroll to for an div element, the hopscoth is scrolling on the body rather the div element.

Hi @taveras , i also want that monkey-patch for now.

from hopscotch.

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.