x-tag / core

The Heart of X-Tag
http://x-tag.github.io/
Other
1.25k stars 151 forks source link

Navigation elements not working on http://x-tag.github.io/ #127

Closed brylie closed 8 years ago

brylie commented 8 years ago

On http://x-tag.github.io/, there is no response when clicking links in the left sidebar menu or the 'Download' link at the top right of the page. I have the following warning in my browser (Firefox 41.0.2 Ubuntu Linux) console:

flags argument of String.prototype.{search,match,replace} is deprecated  x-tag-components.js:4564:26

For reference:

Instead of using this parameter, use a RegExp object with the corresponding flags.

MDN - String.prototype.replace

csuwildcat commented 8 years ago

Do you see anything in the error console? It would take me a little while to start a Linux vm, so any help would be greatly appreciated. On Nov 18, 2015 4:31 AM, "Brylie Christopher Oxley" < notifications@github.com> wrote:

On http://x-tag.github.io/, there is no response when clicking links in the left sidebar menu or the 'Download' link at the top right of the page.

I am using Firefox 41.0.2 on Ubuntu Linux.

— Reply to this email directly or view it on GitHub https://github.com/x-tag/core/issues/127.

brylie commented 8 years ago

Only warnings are issued. I will check again.

csuwildcat commented 8 years ago

This is strange, because I saw another report that it wasn't working in Firefox 42, but I've tested 42 and 43 beta on Windows and it works as expected. Seems like it is either a platform specific Linux Firefox bug, or maybe you have the flag on for experimental native Web Components? Let me know as much detail as you can.

brylie commented 8 years ago

Hm, I am not sure what error console to use, but the Developer Tools console has no errors. I will install Firebug or something similar.

csuwildcat commented 8 years ago

Ah, just saw your String prototype comment. I will swap that code out, but it should still work given it was just deprecated. Thanks for continuing to help debug.

brylie commented 8 years ago

In Firebug console, I have the following:

SyntaxError: test for equality (==) mistyped as assignment (=)?
x-tag-c...ents.js (line 490, col 64)
SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function
x-tag-c...ents.js (line 1098, col 13)
SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function
x-tag-c...ents.js (line 1105, col 13)
SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function
x-tag-c...ents.js (line 1108, col 13)
SyntaxError: test for equality (==) mistyped as assignment (=)?
x-tag-c...ents.js (line 2387, col 40)
TypeError: variable time redeclares argument
x-tag-c...ents.js (line 5099, col 10)
ReferenceError: reference to undefined property window.ShadowDOMPolyfill
x-tag-c...ents.js (line 1006, col 7)
ReferenceError: reference to undefined property registry[name.toLowerCase(...)]
x-tag-c...ents.js (line 2190, col 23)
ReferenceError: reference to undefined property source[key]
x-tag-c...ents.js (line 4012, col 1)
ReferenceError: reference to undefined property definition.extends
x-tag-c...ents.js (line 2098, col 5)
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
x-tag-c...ents.js (line 2042, col 7)
flags argument of String.prototype.{search,match,replace} is deprecated
x-tag-c...ents.js (line 4564, col 26)
ReferenceError: assignment to undeclared variable max
x-tag-c...ents.js (line 5092, col 9)
TypeError: setting a property that has only a getter
x-tag-c...ents.js (line 4673, col 9)
ReferenceError: reference to undefined property this.dynamicElements[0]
x-tag-c...ents.js (line 1534, col 7)
TypeError: setting a property that has only a getter
x-tag-c...ents.js (line 4673, col 9)
ReferenceError: reference to undefined property options.bubbles
x-tag-c...ents.js (line 4741, col 1)
brylie commented 8 years ago

Also, what are your thoughts on triple equals for equality checks?

csuwildcat commented 8 years ago

Actually, I'm thinking your initial string proto depreciation hunch is right. The deprecated variant is in xtag.queryChildren, which the deck element uses.

brylie commented 8 years ago

Cool. Also, double check line 490 and 2387 equality checks.

csuwildcat commented 8 years ago

I am going to change the lib and release the site again here in the next 15 minutes, can I message you here when done and you give it a try for me?

csuwildcat commented 8 years ago

Oh, and is that line 490 of X-Tag, or the X-Tag build that includes the polyfill? I ask because 490 of the full build is from the polyfill, which is a dependency, not our core lib.

brylie commented 8 years ago

For quick reference, here are the syntax errors:

csuwildcat commented 8 years ago

Yeah, those are all in the polyfills we share with Google's Polymer team. They shouldn't be the issue though. I just removed that deprecated arg from Core and pushed an updated copy of the site, can you check to see if it is fixed?

csuwildcat commented 8 years ago

It may take a couple minutes for Github to update the site.

brylie commented 8 years ago

OK, I will refresh in about 10 minutes.

brylie commented 8 years ago

OK, still not working. However, one error pops out now:

TypeError: setting a property that has only a getter

e.currentTarget = e.currentTarget || this;          x-tag-c...ents.js (line 4673, col 9)

That error repeats seven or so times when I click a sidebar link.

Source: e.currentTarget = e.currentTarget || this;

csuwildcat commented 8 years ago

That's a different issue (if it is related), but Github still hasn't refreshed the site with my changes yet :/

brylie commented 8 years ago

Ah, OK. I didn't notice the multiple errors previously.

It might be good to open an issue for each of the log items above, so they can be identified and resolved.

brylie commented 8 years ago

I can open the issues, if that would be helpful.

csuwildcat commented 8 years ago

Yeah, that would help. It's unfortunate that Firefox just decided to enforce a throw on setting currentTarget - it never used to, and we do that for a very specific purpose :/

csuwildcat commented 8 years ago

Github uses CDNs for the org domain gh-page builds, so it looks like my code is flying across the globe to edge nodes via passenger pigeons - sorry for the delay.

brylie commented 8 years ago

I am getting ready to leave work for the evening. I will try to remember to check tomorrow morning. If you respond one more time to this thread, it will show up in my Github alerts.

csuwildcat commented 8 years ago

Do you happen to have any experimental borwser flags on?

csuwildcat commented 8 years ago

@brylie well, I believe I have tracked down the issue:

Firefox on Linux platforms reports the incorrect event.button values, which blocks pointer events from firing correctly: https://bugzilla.mozilla.org/show_bug.cgi?id=1223366

I am grabbing a new copy of the PointerEvents polyfill that has a workaround, the fix for Firefox is scheduled to land in Firefox 45 (~March 2016)

csuwildcat commented 8 years ago

@brylie I just pushed out the fix: https://github.com/x-tag/core/commit/30f25ec97a724a7dbb95765c1bbee28bcf2df142#diff-e6b6ffa1a0d9021cac43ba9988c583c8R862, and have verified it works on my Linux version of Firefox. Can you confirm yours works as well so we can close this out?

brylie commented 8 years ago

@csuwildcat yeppers, the fix works! Thanks for your work on this fix, and the X-Tag project :-) ALso, go Wildcats!