on master help sign in
Fix #563
commita4b591be74cebceaa4f6220912aa6e7886c48991 authorEvan Czaplicki <info@elm-lang.org> dateFri 4 Apr 2014, 00:36 (13 years ago) parenta863e31
1 file changed−22
libraries/Native/Graphics/Input.js−22
libraries/Native/Graphics/Input.js−22
@@ -295,29 +295,7 @@ Elm.Native.Graphics.Input.make = function(elm) {
295295 }));
296296 }
297297
298− function mouseUpdate(event) {
299− var direction = field.selectionDirection === 'forward' ? 'Forward' : 'Backward';
300− elm.notify(field.elm_signal.id, field.elm_handler({
301− _:{},
302− string: field.value,
303− selection: {
304− _:{},
305− start: field.selectionStart,
306− end: field.selectionEnd,
307− direction: { ctor: direction }
308− },
309− }));
310− }
311− function mousedown(event) {
312− mouseUpdate(event);
313− elm.node.addEventListener('mouseup', mouseup);
314− }
315− function mouseup(event) {
316− mouseUpdate(event);
317− elm.node.removeEventListener('mouseup', mouseup)
318− }
319298 field.addEventListener('input', inputUpdate);
320− field.addEventListener('mousedown', mousedown);
321299 field.addEventListener('focus', function() {
322300 field.elm_hasFocus = true;
323301 });