def getRange(self): if self.m_lastRange is None: self.getSelection() return Selection.getRange() else: return self.m_lastRange
def captureSelection(self): try: self.getSelection() self.m_lastRange = Selection.getRange() except: GWT.log("Error capturing selection for IE", ex)
def run(self): try: self.getSelection() rng = Selection.getRange() if (self.timerRange is None) or (not self.timerRange.equals(rng)): self.onSelectionChange(rng) self.timerRange = rng except: GWT.log("Error in timer selection", ex)
def captureSelection(self): """ This captures the selection when the mouse leaves the RTE, because in IE the selection indicating the cursor position is lost once another widget gains focus. Could be implemented for IE only. """ try: self.getSelection() self.lastRange = Selection.getRange() except: GWT.log("Error capturing selection for IE", ex)