diff --git a/UI/WebServerResources/HTMLElement.js b/UI/WebServerResources/HTMLElement.js
index 1426697b1..ef2bd894f 100644
--- a/UI/WebServerResources/HTMLElement.js
+++ b/UI/WebServerResources/HTMLElement.js
@@ -72,8 +72,7 @@ Element.addMethods({
var i = 0;
- while (currentElement
- && currentElement instanceof HTMLElement) {
+ while (currentElement && currentElement.tagName) {
offset += currentElement.offsetTop;
currentElement = currentElement.parentNode;
i++;
diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js
index a6ecec0db..1f3e979ab 100644
--- a/UI/WebServerResources/SchedulerUI.js
+++ b/UI/WebServerResources/SchedulerUI.js
@@ -1128,11 +1128,11 @@ function onCalendarRemove(event) {
function configureSearchField() {
var searchValue = $("searchValue");
- Event.observe(searchValue, "mousedown", onSearchMouseDown);
- Event.observe(searchValue, "click", popupSearchMenu);
- Event.observe(searchValue, "blur", onSearchBlur);
- Event.observe(searchValue, "focus", onSearchFocus);
- Event.observe(searchValue, "keydown", onSearchKeyDown);
+ Event.observe(searchValue, "mousedown", onSearchMouseDown.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "click", popupSearchMenu.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "blur", onSearchBlur.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "focus", onSearchFocus.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "keydown", onSearchKeyDown.bindAsEventListener(searchValue));
}
function initCalendars() {
diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js
index 9e16fe321..cc7a9f8ba 100644
--- a/UI/WebServerResources/generic.js
+++ b/UI/WebServerResources/generic.js
@@ -690,7 +690,7 @@ function checkDropDown(event) {
/* search field */
function popupSearchMenu(event) {
- var node = event.target;
+ var node = getTarget(event);
var menuId = this.getAttribute("menuid");
relX = event.pageX - node.cascadeLeftOffset();