fix bug: upload img when editor is not focused