webmobilestar / rikaikun

Automatically exported from code.google.com/p/rikaikun
0 stars 0 forks source link

Problem on hovering over empty <select> #110

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Hover any empty <select> you find.

What is the expected output? What do you see instead?
Cause js error and other scripts stop running.

Please provide any additional information below.

==> Line 741 in cperacontent.js, you have :
     tdata.title = ev.target.options[ev.target.selectedIndex].text;
You should check that :
     typeof ev.target.options[ev.target.selectedIndex] !== "undefined"
or just : 
     ev.target.selectedIndex !== -1
I would just add :
     tdata.title = ev.target.selectedIndex >= 0 && ev.target.options[ev.target.selectedIndex].text;

Original issue reported on code.google.com by evann.co...@gmail.com on 11 Jun 2015 at 5:27

GoogleCodeExporter commented 8 years ago
This seems reasonable but also it seems that cperacontent.js is from another 
similar extension (Perapera Chinese Popup Dictionary)

Depending on when that extension forked mine it may or may not also be in 
rikaikun so I'll leave this open to check that.

Original comment by melin...@gmail.com on 13 Jun 2015 at 1:05