Permalink
Browse files

MDL-40470 JavaScript: Correct issue when checking select change in Fi…

…refox
  • Loading branch information...
1 parent 9844660 commit 3bdbe1b08b36cf1d74e15f605fda464eeadb585a @andrewnicols andrewnicols committed Oct 15, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/yui/formautosubmit/formautosubmit.js
View
4 lib/yui/formautosubmit/formautosubmit.js
@@ -66,8 +66,8 @@ YUI.add('moodle-core-formautosubmit',
var startindex = select.getData('startindex');
var currentindex = select.get('selectedIndex');
- var previousindex = select.getAttribute('data-previousindex');
- select.setAttribute('data-previousindex', currentindex);
+ var previousindex = parseInt(select.getData('previousindex'), 10);
+ select.setData('previousindex', currentindex);
if (!previousindex) {
previousindex = startindex;
}

0 comments on commit 3bdbe1b

Please sign in to comment.