Author: sergeyhalipov
Date: 2007-06-07 10:05:05 -0400 (Thu, 07 Jun 2007)
New Revision: 1076
Modified:
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/simple-draggable.js
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculo.js
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
Prevent lower case when checking 'tagName' in JS.
Modified:
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/simple-draggable.js
===================================================================
---
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/simple-draggable.js 2007-06-07
13:25:06 UTC (rev 1075)
+++
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/simple-draggable.js 2007-06-07
14:05:05 UTC (rev 1076)
@@ -53,11 +53,12 @@
if(Event.isLeftClick(event)) {
var src = Event.element(event);
if(src.tagName && (
- src.tagName=='INPUT' ||
- src.tagName=='SELECT' ||
- src.tagName=='OPTION' ||
- src.tagName=='BUTTON' ||
- src.tagName=='TEXTAREA')) return;
+ src.tagName.toUpperCase() == 'INPUT' ||
+ src.tagName.toUpperCase() == 'SELECT' ||
+ src.tagName.toUpperCase() == 'OPTION' ||
+ src.tagName.toUpperCase() == 'BUTTON' ||
+ src.tagName.toUpperCase() == 'TEXTAREA'))
+ return;
Event.stop(event);
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculo.js
===================================================================
---
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculo.js 2007-06-07
13:25:06 UTC (rev 1075)
+++
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculo.js 2007-06-07
14:05:05 UTC (rev 1076)
@@ -298,10 +298,11 @@
// abort on form elements, fixes a Firefox issue
var src = Event.element(event);
if (src.tagName && (
- src.tagName == 'INPUT' ||
- src.tagName == 'SELECT' ||
- src.tagName == 'BUTTON' ||
- src.tagName == 'TEXTAREA')) return;
+ src.tagName.toUpperCase() == 'INPUT' ||
+ src.tagName.toUpperCase() == 'SELECT' ||
+ src.tagName.toUpperCase() == 'BUTTON' ||
+ src.tagName.toUpperCase() == 'TEXTAREA'))
+ return;
if (this.element._revert) {
this.element._revert.cancel();
@@ -551,10 +552,11 @@
// abort on form elements, fixes a Firefox issue
var src = Event.element(event);
if (src.tagName && (
- src.tagName == 'INPUT' ||
- src.tagName == 'SELECT' ||
- src.tagName == 'BUTTON' ||
- src.tagName == 'TEXTAREA')) return;
+ src.tagName.toUpperCase() == 'INPUT' ||
+ src.tagName.toUpperCase() == 'SELECT' ||
+ src.tagName.toUpperCase() == 'BUTTON' ||
+ src.tagName.toUpperCase() == 'TEXTAREA'))
+ return;
if (this.element._revert) {
this.element._revert.cancel();
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-07
13:25:06 UTC (rev 1075)
+++
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-07
14:05:05 UTC (rev 1076)
@@ -349,7 +349,7 @@
var realOffset = 0;
while (item && (item != scroll)) {
// Avoid bug in Safari. Details:
http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in...
- if ("SAFARI" == RichFaces.navigatorType() && "TR" ==
item.tagName) {
+ if ("SAFARI" == RichFaces.navigatorType() && "TR" ==
item.tagName.toUpperCase()) {
realOffset += document.getElementsByClassName("dr-sb-cell-padding",
item)[0].offsetTop;
}
else