Giter Club home page Giter Club logo

Comments (7)

jrosindell avatar jrosindell commented on May 30, 2024

OK here's what I've found...

1.) the first touch to open a node or leaf popup works fine, the second touch does not and so on for any further touches. So the state of something is changed by the first touch and close event
2.) mouse always works regardless
3.) one instance of opening with mouse 'resets' the state so that now it will work again once more on touch, but only once and then it breaks as described in 1.)

For console logs...

first touch working (node)

@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:365 OneZoom internal JS has been asked to open tabs
@Mammalia?init=zoom:369 Hidden content and showing loading animation
@Mammalia?init=zoom:373 populating linkout tabs with API data
@Mammalia?init=zoom:393 set data-src for 'wiki' to //www.wikidata.org/wiki/Special:GoToLinkedPage?site=en&itemid=Q181537
@Mammalia?init=zoom:393 set data-src for 'eol' to http://129.31.238.66:8000/tree/eol_ID.json/3014446/229560
@Mammalia?init=zoom:396 Hiding tab for 'iucn' which is not present for this taxon
@Mammalia?init=zoom:393 set data-src for 'ncbi' to http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=32524
@Mammalia?init=zoom:393 set data-src for 'ozspons' to http://129.31.238.66:8000/sponsor_node?embed=True&id=781761
@Mammalia?init=zoom:576 Hiding wiki loading pic

Second touch not working (node)

@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:365 OneZoom internal JS has been asked to open tabs
@Mammalia?init=zoom:369 Hidden content and showing loading animation
@Mammalia?init=zoom:373 populating linkout tabs with API data
@Mammalia?init=zoom:393 set data-src for 'wiki' to //www.wikidata.org/wiki/Special:GoToLinkedPage?site=en&itemid=Q181537
@Mammalia?init=zoom:393 set data-src for 'eol' to http://129.31.238.66:8000/tree/eol_ID.json/3014446/229560
@Mammalia?init=zoom:396 Hiding tab for 'iucn' which is not present for this taxon
@Mammalia?init=zoom:393 set data-src for 'ncbi' to http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=32524
@Mammalia?init=zoom:393 set data-src for 'ozspons' to http://129.31.238.66:8000/sponsor_node?embed=True&id=781761
@Mammalia?init=zoom:576 Hiding wiki loading pic

Mouse working (node)

@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:365 OneZoom internal JS has been asked to open tabs
@Mammalia?init=zoom:369 Hidden content and showing loading animation
@Mammalia?init=zoom:373 populating linkout tabs with API data
@Mammalia?init=zoom:393 set data-src for 'wiki' to //www.wikidata.org/wiki/Special:GoToLinkedPage?site=en&itemid=Q181537
@Mammalia?init=zoom:393 set data-src for 'eol' to http://129.31.238.66:8000/tree/eol_ID.json/3014446/229560
@Mammalia?init=zoom:396 Hiding tab for 'iucn' which is not present for this taxon
@Mammalia?init=zoom:393 set data-src for 'ncbi' to http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=32524
@Mammalia?init=zoom:393 set data-src for 'ozspons' to http://129.31.238.66:8000/sponsor_node?embed=True&id=781761
@Mammalia?init=zoom:576 Hiding wiki loading pic

First touch working (leaf)

@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:365 OneZoom internal JS has been asked to open tabs
@Mammalia?init=zoom:369 Hidden content and showing loading animation
@Mammalia?init=zoom:373 populating linkout tabs with API data
@Mammalia?init=zoom:393 set data-src for 'wiki' to //www.wikidata.org/wiki/Special:GoToLinkedPage?site=en&itemid=Q757942
@Mammalia?init=zoom:393 set data-src for 'eol' to http://129.31.238.66:8000/tree/eol_ID.json/1000242/3615204
@Mammalia?init=zoom:393 set data-src for 'iucn' to http://www.iucnredlist.org/details/136322/0
@Mammalia?init=zoom:393 set data-src for 'ncbi' to http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=1684341
@Mammalia?init=zoom:393 set data-src for 'ozspons' to http://129.31.238.66:8000/sponsor_leaf?embed=True&ott=3615204
@Mammalia?init=zoom:576 Hiding wiki loading pic

Second touch broken leaf (leaf)

@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:365 OneZoom internal JS has been asked to open tabs
@Mammalia?init=zoom:369 Hidden content and showing loading animation
@Mammalia?init=zoom:373 populating linkout tabs with API data
@Mammalia?init=zoom:393 set data-src for 'wiki' to //www.wikidata.org/wiki/Special:GoToLinkedPage?site=en&itemid=Q757942
@Mammalia?init=zoom:393 set data-src for 'eol' to http://129.31.238.66:8000/tree/eol_ID.json/1000242/3615204
@Mammalia?init=zoom:393 set data-src for 'iucn' to http://www.iucnredlist.org/details/136322/0
@Mammalia?init=zoom:393 set data-src for 'ncbi' to http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=1684341
@Mammalia?init=zoom:393 set data-src for 'ozspons' to http://129.31.238.66:8000/sponsor_leaf?embed=True&ott=3615204
@Mammalia?init=zoom:576 Hiding wiki loading pic

Mouse working (leaf)

@Mammalia?init=zoom:345 OneZoom internal JS has been asked to hide all open modals & dropdowns
@Mammalia?init=zoom:365 OneZoom internal JS has been asked to open tabs
@Mammalia?init=zoom:369 Hidden content and showing loading animation
@Mammalia?init=zoom:373 populating linkout tabs with API data
@Mammalia?init=zoom:393 set data-src for 'wiki' to //www.wikidata.org/wiki/Special:GoToLinkedPage?site=en&itemid=Q757942
@Mammalia?init=zoom:393 set data-src for 'eol' to http://129.31.238.66:8000/tree/eol_ID.json/1000242/3615204
@Mammalia?init=zoom:393 set data-src for 'iucn' to http://www.iucnredlist.org/details/136322/0
@Mammalia?init=zoom:393 set data-src for 'ncbi' to http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=1684341
@Mammalia?init=zoom:393 set data-src for 'ozspons' to http://129.31.238.66:8000/sponsor_leaf?embed=True&ott=3615204
@Mammalia?init=zoom:576 Hiding wiki loading pic

from oztree.

hyanwong avatar hyanwong commented on May 30, 2024

So

  1. Weird that 345 OneZoom internal JS has been asked to hide... is called twice at the start
  2. What happens if you comment out lines 81-87 in treeLayout.html
  3. What happens if you comment out line 324 & 325 (should simply hide the loading pic - this seems like the last .hide() that is called)

from oztree.

hyanwong avatar hyanwong commented on May 30, 2024

Is there perhaps some problem with trapping the touch events? This is line 684 & 685 in treeLayout.html.

from oztree.

hyanwong avatar hyanwong commented on May 30, 2024

Or perhaps the touch trapping in the ECMAscript. E.g. in interactor/touch.js. I see we mostly don't do event.stopPropagation() on touch in interactor/touch.js, but just do event.preventDefault(). I wonder if we should do both?

from oztree.

hyanwong avatar hyanwong commented on May 30, 2024

Could this be linked to #26?

@jrosindell: do you still get the auto-close behaviour if you comment out lines 15-22 of navigation/setup_page.js?

(this is not the reason, checked by yan)

from oztree.

hyanwong avatar hyanwong commented on May 30, 2024

I have pushed a new branch, autoclose-debug-test, with a very simple file, life_test.html, which shows the behaviour if you open a image copyright symbol.

The same behaviour is not show on touch (my iPhone) with an almost identical codepen example: https://codepen.io/hyanwong/pen/eGPNvm, so it is something to do with the interaction with the OZ ECMAscript, I think.

from oztree.

hyanwong avatar hyanwong commented on May 30, 2024

OK - found the bug. As commented above, we need to do event.stopPropagation() in the touch.js events, otherwise they propagate up and cause another touch event in the UI layer, which is "outside" the modal, and so closes it.

from oztree.

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.