From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: John 'Warthog9' Hawley <warthog9@eaglescrag.net>,
Kevin Cernekee <cernekee@gmail.com>
Subject: Re: [PATCHv2/RFC 10/11] gitweb.js: Add UI for selecting common timezone to display dates
Date: Fri, 15 Apr 2011 19:43:10 +0200 [thread overview]
Message-ID: <201104151943.11537.jnareb@gmail.com> (raw)
In-Reply-To: <1302878645-458-11-git-send-email-jnareb@gmail.com>
On Fri, 15 Apr 2011, Jakub Narebski wrote:
> KNOWN BUGS:
> ===========
> * Timezone selection doesn't work in Chromium 6.0.472.62 (59676) and
> Google Chrome 10.0.648.204:
>
> Uncaught Error: NOT_FOUND_ERR: DOM Exception 8
> removeChangeTZForm
> /gitweb-static/gitweb.js:785
> onTZFormChange
>
> line 785: var removed = container.removeChild(popup);
>
> It works in Mozilla 1.17.2, Konqueror 3.5.3, Firefox 3.6.15, 3.6.16
> and 4.0, Internet Explorer 8.0, Opera 10.63.
Something strange is happening here. removeChangeTZForm looks like this:
function removeChangeTZForm(documentFragment, target, tzClassName) {
// find containing element, where we appended timezone selection UI
// `target' is somewhere inside timezone menu
var container = target.parentNode, popup = target;
while (container &&
container.className !== tzClassName) {
popup = container;
container = container.parentNode;
}
// safety check if we found correct container,
// and if it isn't deleted already
if (!container || !popup ||
container.className !== tzClassName ||
popup.className !== 'popup') {
return documentFragment;
}
// timezone selection UI was appended as last child
// see also displayChangeTZForm function
var removed = container.removeChild(popup); // <--- !!! here Chrome throws exception !!!
if (documentFragment.firstChild !== removed) { // the only child
// re-append it so it would be available for next time
documentFragment.appendChild(removed);
}
// all of inline style was added by this script
container.removeAttribute('style');
return documentFragment;
}
Note that from above code one would assume that after first loop we
would assert that we always have popup.parentNode === contained.
When working with JavaScript debugger in Google Chrome I have found
that at the time that exception is thrown popup.parentNode is
DocumentFragment, not HTMLElement / HTMLSpanElement.
Something strange is going there. I'd check if not setting 'onblur'
event handler (which doesn't work as expected anyway) would help.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2011-04-15 17:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 14:43 [PATCHv2 00/11] gitweb: Change timezone in dates using JavaScript Jakub Narebski
2011-04-15 14:43 ` [PATCH 01/11] gitweb: Split JavaScript for maintability, combining on build Jakub Narebski
2011-04-15 14:43 ` [PATCH 02/11] gitweb.js: Update and improve comments in JavaScript files Jakub Narebski
2011-04-15 14:43 ` [PATCH 03/11] gitweb.js: Provide default values for padding in padLeftStr and padLeft Jakub Narebski
2011-04-15 14:43 ` [PATCH 04/11] gitweb.js: Extract and improve datetime handling Jakub Narebski
2011-04-15 14:43 ` [PATCH 05/11] gitweb.js: Introduce gitweb/static/js/lib/cookies.js Jakub Narebski
2011-04-15 14:44 ` [PATCH 06/11] gitweb.js: Provide getElementsByClassName method (if it not exists) Jakub Narebski
2011-04-15 14:44 ` [PATCH 07/11] gitweb: Refactor generating of long dates into format_timestamp_html Jakub Narebski
2011-04-15 14:44 ` [PATCH 08/11] gitweb: Unify the way long timestamp is displayed Jakub Narebski
2011-04-15 14:44 ` [PATCH 09/11] gitweb: JavaScript ability to adjust time based on timezone Jakub Narebski
2011-04-15 14:44 ` [PATCHv2/RFC 10/11] gitweb.js: Add UI for selecting common timezone to display dates Jakub Narebski
2011-04-15 17:43 ` Jakub Narebski [this message]
2011-04-15 18:06 ` Jakub Narebski
2011-04-15 19:17 ` [PATCHv3 " Jakub Narebski
2011-04-15 14:44 ` [PATCHv2/RFC 11/11] gitweb: Make JavaScript ability to adjust timezones configurable Jakub Narebski
2011-04-19 1:01 ` [PATCHv2 00/11] gitweb: Change timezone in dates using JavaScript Junio C Hamano
2011-04-19 1:26 ` Jakub Narebski
2011-04-19 6:36 ` Jakub Narebski
2011-04-19 16:58 ` Junio C Hamano
2011-04-19 17:18 ` [PATCH 12/11] Remove gitweb/gitweb.cgi and other legacy targets from main Makefile Jakub Narebski
2011-04-19 11:54 ` [PATCH -01/11] git-instaweb: Simplify build dependency on gitweb Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201104151943.11537.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=cernekee@gmail.com \
--cc=git@vger.kernel.org \
--cc=warthog9@eaglescrag.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).