回答編集履歴
2
変更
answer
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
```Javascript
|
2
|
+
var size = document.getElementById("sample").clientHeight;
|
1
|
-
|
3
|
+
document.onmouseup = function() {
|
2
|
-
|
3
|
-
|
4
|
+
if (size != document.getElementById("sample").clientHeight) {
|
4
|
-
ん?
|
5
|
-
|
5
|
+
console.log('resize');
|
6
|
-
|
6
|
+
}
|
7
|
+
size = document.getElementById("sample").clientHeight;
|
8
|
+
}
|
7
|
-
|
9
|
+
```もうこれでいいんじゃないかと。
|
8
|
-
mousedownで判断されたらどうですか?
|
1
間違い
answer
CHANGED
@@ -1,1 +1,8 @@
|
|
1
|
-
chromeとfirefoxだと、ちゃんと出ますけど?
|
1
|
+
chromeとfirefoxだと、ちゃんとclickは出ますけど?
|
2
|
+
|
3
|
+
###追記
|
4
|
+
ん?
|
5
|
+
> ドラッグしたまま要素外でマウスを離すとクリックイベントが発火しません。
|
6
|
+
|
7
|
+
それは、clickイベントではないですね。
|
8
|
+
mousedownで判断されたらどうですか?
|