lib/watir-classic/input_elements.rb in watir-classic-3.0.0 vs lib/watir-classic/input_elements.rb in watir-classic-3.1.0
- old
+ new
@@ -230,10 +230,11 @@
value = self.value
dispatch_event("onSelect")
dispatch_event("ondragstart")
dispatch_event("ondrag")
+ destination.assert_exists
destination.dispatch_event("onDragEnter")
destination.dispatch_event("onDragOver")
destination.dispatch_event("ondrop")
dispatch_event("ondragend")
@@ -360,10 +361,9 @@
# Return the value (a string), limited to the maxlength of the element.
def limit_to_maxlength(value)
return value if @o.invoke('type') =~ /textarea/i # text areas don't have maxlength
if value.length > maxlength
value = value[0 .. maxlength - 1]
- @container.log " Supplied string is #{value.length} chars, which exceeds the max length (#{maxlength}) of the field. Using value: #{value}"
end
value
end
end