Merge pull request #2275 from mehtaphysical/char_reserved_in_js
change variable char to character
This commit is contained in:
commit
52de738e8a
1 changed files with 8 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (c) 2010, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
|
|
@ -46,15 +46,15 @@ var MouseHandler = function(editor) {
|
|||
new DefaultHandlers(this);
|
||||
new DefaultGutterHandler(this);
|
||||
new DragdropHandler(this);
|
||||
|
||||
|
||||
var focusEditor = function(e) {
|
||||
// because we have to call event.preventDefault() any window on ie and iframes
|
||||
// because we have to call event.preventDefault() any window on ie and iframes
|
||||
// on other browsers do not get focus, so we have to call window.focus() here
|
||||
if (!document.hasFocus || !document.hasFocus())
|
||||
window.focus();
|
||||
editor.focus();
|
||||
};
|
||||
|
||||
|
||||
var mouseTarget = editor.renderer.getMouseEventTarget();
|
||||
event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
|
||||
event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
|
||||
|
|
@ -85,12 +85,12 @@ var MouseHandler = function(editor) {
|
|||
editor.on("mousemove", function(e){
|
||||
if (_self.state || _self.$dragDelay || !_self.$dragEnabled)
|
||||
return;
|
||||
|
||||
var char = editor.renderer.screenToTextCoordinates(e.x, e.y);
|
||||
|
||||
var character = editor.renderer.screenToTextCoordinates(e.x, e.y);
|
||||
var range = editor.session.selection.getRange();
|
||||
var renderer = editor.renderer;
|
||||
|
||||
if (!range.isEmpty() && range.insideStart(char.row, char.column)) {
|
||||
if (!range.isEmpty() && range.insideStart(character.row, character.column)) {
|
||||
renderer.setCursorStyle("default");
|
||||
} else {
|
||||
renderer.setCursorStyle("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue